Enterprise Consumption Information Processing Method and Device
By building an enterprise queue and processing consumption requests, the problem of real-time processing of enterprise consumption requests is solved, and asynchronous response and efficient processing are achieved.
Patent Information
- Application Number
- CN202411586407.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2044-11-08
AI Technical Summary
When facing a large number of consumer requests from enterprises, real-time processing is under great pressure, and each enterprise's requests are irregular, making it difficult to achieve real-time responses and requires a large amount of computing resources.
By building a queue of enterprises, using the pre-built interface to obtain consumption requests, parse the requests to obtain the associated target enterprise consumption information and ID information, process the consumption information and send the results back to the enterprise through the interface.
It realizes one-click reporting of consumer requests and asynchronous responses, reducing the pressure of real-time response to each enterprise request and improving processing efficiency.
Smart Images

Figure CN119127995B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information processing, and particularly to a method and device for processing enterprise consumption information. Background Art
[0002] When facing consumption requests from a large number of enterprises, such as prepayment requests, real-time processing usually causes processing pressure. Moreover, each of the large number of enterprises has a large number of subordinate enterprises, and these subordinate enterprises send consumption requests to their affiliated enterprises irregularly. Therefore, it is relatively difficult to perform real-time processing of consumption requests and requires a large amount of computing resources to complete. Summary of the Invention
[0003] The main objective of the present invention is to provide a method and device for processing enterprise information consumption to solve the deficiencies in the related technologies.
[0004] To achieve the above objective, according to the first aspect of the present invention, a method for processing enterprise consumption information is provided, including: in response to obtaining a consumption request of an enterprise through a pre-constructed interface, constructing a unique identifier for the enterprise; parsing the consumption request to obtain a queue corresponding to the enterprise, where the queue includes consumption information of target enterprises associated with the enterprise and ID information of the target enterprises; processing the consumption information of the target enterprises in the queue, and sending the processing result to the enterprise through the pre-constructed interface based on the unique identifier.
[0005] Optionally, the method further includes: providing presentation page data for the enterprise to present a visualization configuration page on the enterprise side; presenting the enterprises associated with the enterprise in the visualization configuration page; if there is an associated enterprise that sends a first consumption request to the server corresponding to the enterprise among the associated enterprises, then distinctively marking the associated enterprise in the visualization configuration page; monitoring whether the distinctively marked associated enterprise is selected; and generating the consumption request if it is selected.
[0006] Optionally, generating the consumption request if it is selected includes: obtaining the ID corresponding to the selected associated enterprise from the database and obtaining the consumption information of its corresponding first consumption request from the log; constructing a queue based on the ID corresponding to the associated enterprise and the consumption information of its corresponding first consumption request to generate the consumption request.
[0007] Optionally, after obtaining the queue corresponding to the enterprise, the following steps are included: adding a queue identifier to the queue corresponding to the enterprise, and associating timestamp information with the queue, where the queue identifier is the same as the unique identifier; storing the queue associated with the timestamp information in a cache; when a queue with the same queue identifier is stored in the cache again within a specified period, merging the queues with the same queue identifier.
[0008] Optionally, processing the consumption information of the target enterprise in the queue includes: determining the priority of queue processing based on the associated timestamp information, and processing the queue based on the priority.
[0009] Optionally, processing the consumption information of the target enterprise in the queue includes: calling the account of the target enterprise based on the ID of the target enterprise; processing the consumption information based on the consumption information of the target enterprise and the account information.
[0010] According to a second aspect of the present invention, there is provided a consumption information processing device, including a request response unit configured to obtain a consumption request of an enterprise in response to a pre-constructed interface and construct a unique identifier for the enterprise; a parsing unit configured to parse the consumption request to obtain the queue corresponding to the enterprise, where the queue includes the consumption information of the target enterprise associated with the enterprise and the ID information of the target enterprise; a consumption information processing unit configured to process the consumption information of the target enterprise in the queue and send the processing result to the enterprise through the pre-constructed interface based on the unique identifier.
[0011] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing the computer to execute the method according to any one of the first aspects.
[0012] According to a fourth aspect of the present invention, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to cause the at least one processor to execute the method according to any one of the implementation manners of the first aspect.
[0013] According to a fifth aspect of the present invention, there is provided a computer program product including a computer program that implements the method according to any one of the first aspects when executed by a processor.
[0014] Enterprise consumption information processing method and device in this embodiment. The method includes: in response to a consumption request of an enterprise obtained through a pre-built interface, constructing a unique identifier for the enterprise; parsing the consumption request to obtain a queue corresponding to the enterprise, where the queue includes consumption information of a target enterprise associated with the enterprise and ID information of the target enterprise; processing the consumption information of the target enterprise in the queue, and sending the processing result to the enterprise through the pre-built interface based on the unique identifier. By constructing a queue for C-end enterprises, one-key reporting of consumption requests is realized, asynchronous response to consumption requests is achieved, and the problem of high processing pressure caused by real-time response to each C-end enterprise request is overcome. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0016] Figure 1 is a flowchart of a consumption information processing method according to an embodiment of the present invention;
[0017] Figure 2 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.
[0020] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
[0021] According to an embodiment of the present invention, a method for processing enterprise consumption information is provided. The system architecture of the method in this embodiment is as Figure 1 shown, and includes the following steps 101 to 103:
[0022] Step 101: In response to a consumption request of an enterprise obtained through a pre-constructed interface, construct a unique identifier for the enterprise.
[0023] In this step, an interface for B-side enterprises is pre-constructed, and through this interface, a consumption information processing request sent by a B-side enterprise can be realized. When the server receives this request, a unique enterprise identifier is constructed based on the enterprise indicated by the request.
[0024] Step 102: Parse the consumption request to obtain a queue corresponding to the enterprise, where the queue includes consumption information of target enterprises associated with the enterprise and ID information of the target enterprises.
[0025] In this step, any B-side enterprise may be associated with multiple enterprises, i.e., C-side enterprises, downward. The C-side enterprises can send a first consumption request to their affiliated B-side enterprise, and the consumption information and enterprise ID information indicated by the first consumption request can be used to form a queue. Exemplarily, C1, C2, C3, and C4 send a first consumption request, such as a pre-recharge request, to their affiliated B1. The pre-recharge amount in the request is used as consumption information, and the ID information of the C1, C2, C3, and C4 enterprises is used to form a queue.
[0026] Step 103: Process the consumption information of the target enterprises in the queue, and send the processed result to the enterprise through the pre-constructed interface based on the unique identifier.
[0027] In this step, after processing the consumption information of the target enterprises in the queue, the processed result is inserted into the queue and further fed back to the enterprise through the unique identifier of the enterprise.
[0028] As an optional implementation manner of this embodiment, the method further includes: providing presentation page data for the enterprise for presenting a visualization configuration page on the enterprise side; presenting the enterprises associated with the enterprise in the visualization configuration page; if there are associated enterprises that send a first consumption request to the server corresponding to the enterprise among the associated enterprises, then distinguish and identify the associated enterprises in the visualization configuration page; monitor whether the associated enterprises with distinguished identifiers are selected; if selected, generate the consumption request.
[0029] In this alternative implementation, there are numerous C-end enterprises under the B-end enterprises. If each C-end enterprise sends consumption requests to its affiliated B-end enterprise at irregular intervals, and the B-end sends requests to the server, which is the execution entity of the method in this embodiment, in real time, then the server will face huge data processing challenges. Therefore, a visual configuration page is provided for the B-end. After the B-end enterprise logs in to the visual configuration page, all C-end enterprises associated with the B-end can be presented. If any C-end enterprise sends a consumption request to the B-end enterprise, the C-end enterprise will be marked on the visual configuration page for the B-end enterprise user to select all enterprises or some enterprises among the marked C-end enterprises. A consumption request is generated for the selected C-end enterprises, including constructing a queue for the C-end enterprises.
[0030] Through this alternative implementation, one-key reporting by C-end enterprises is achieved, without the need to respond to the consumption requests of each C-end enterprise in real time as in the related technologies.
[0031] As an alternative implementation of this embodiment, if selected, generating the consumption request includes: obtaining the ID corresponding to the selected associated enterprise from the database, and obtaining the consumption information of its corresponding first consumption request from the log; constructing a queue based on the ID corresponding to the associated enterprise and the consumption information of its corresponding first consumption request to generate the consumption request.
[0032] In this alternative implementation, each C-end enterprise has its own corresponding enterprise ID, which can be an account ID. The enterprise ID can be retrieved from the database, and through this enterprise ID, the consumption operation of the account can be completed in the subsequent consumption information processing stage. The consumption requests of each C-end enterprise are recorded in the log, so the consumption information of the C-end enterprise, such as pre-recharge information, can be obtained from the log.
[0033] As an alternative implementation of this embodiment, after obtaining the queue corresponding to the enterprise, it includes: adding a queue identifier to the queue corresponding to the enterprise, and associating timestamp information with the queue, where the queue identifier is the same as the unique identifier; storing the queue associated with the timestamp information in the cache; when a queue with the same queue identifier is stored in the cache again within a specified period, the queues with the same queue identifier are merged.
[0034] In this alternative implementation, since the server faces numerous B-end enterprises, if synchronous processing is performed, it will also cause great processing pressure on the server. Therefore, all queues are stored in the cache, and a timestamp is marked when the queue is stored in the cache, so that asynchronous processing can be performed in chronological order.
[0035] Furthermore, since enterprise B may receive consumption requests from enterprise C in real time, enterprise B may continuously send consumption processing requests to the server. If the server is also designed to provide real-time responses as in related technologies, there will still be a relatively large processing pressure. Therefore, a queue merging mechanism is designed in the cache. Under this mechanism, a period is set. If queues with the same queue identifier are stored within a period, the queues are merged. Specifically, when storing a queue in the cache, it is matched based on the identifier of the queue. If a queue with the same identifier is found, the current queue is merged with the previous queue; if no queue with the same identifier is found, the current queue is directly stored in the cache. When merging, it is merged according to the enterprise ID. If there are the same enterprise IDs in the queue, the enterprises with the same ID are placed side by side for subsequent parallel processing.
[0036] As an optional implementation manner of this embodiment, processing consumption information for the target enterprise in the queue includes: determining the priority of queue processing based on associated timestamp information, and processing the queue based on the priority.
[0037] In this optional implementation manner, during processing, it is processed in the chronological order of the queue.
[0038] As an optional implementation manner of this embodiment, processing consumption information for the target enterprise in the queue includes: invoking the account information of the target enterprise based on the ID of the target enterprise; processing the consumption information based on the consumption information of the target enterprise and the account information.
[0039] In this optional implementation manner, during processing, the account information of the target enterprise is invoked based on the ID, and the account information is processed based on the consumption information. If it is a pre-recharge request, this processing includes recharging the amount to the account.
[0040] After processing is completed, the processing results of different enterprises are inserted into the queue and fed back together with a unique identifier. This embodiment realizes the asynchronous processing of consumption information through the concept of one-key reporting and asynchronous queue processing.
[0041] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0042] According to an embodiment of the present invention, there is also provided a consumption information processing device, including a request response unit configured to respond to a consumption request of an enterprise obtained through a pre-built interface and construct a unique identifier for the enterprise; a parsing unit configured to parse the consumption request to obtain a queue corresponding to the enterprise, where the queue includes consumption information of a target enterprise associated with the enterprise and ID information of the target enterprise; and a consumption information processing unit configured to process the consumption information of the target enterprise in the queue and send the processing result to the enterprise through the pre-built interface based on the unique identifier.
[0043] As an optional implementation manner of this embodiment, the device also provides presentation page data for the enterprise for presenting a visualization configuration page at the enterprise side where the enterprise is located; where the enterprises associated with the enterprise are presented in the visualization configuration page; if there is an associated enterprise that sends a first consumption request to the service end corresponding to the enterprise among the associated enterprises, the associated enterprise is distinctly marked in the visualization configuration page; monitor whether the associated enterprise with the distinct mark is selected; if it is selected, generate the consumption request.
[0044] As an optional implementation manner of this embodiment, if it is selected, generating the consumption request includes: obtaining the ID corresponding to the selected associated enterprise from the database and obtaining the consumption information of its corresponding first consumption request from the log; constructing a queue based on the ID corresponding to the associated enterprise and the consumption information of its corresponding first consumption request to generate the consumption request.
[0045] As an optional implementation manner of this embodiment, after obtaining the queue corresponding to the enterprise, it includes: adding a queue identifier to the queue corresponding to the enterprise and associating timestamp information with the queue, where the queue identifier is the same as the unique identifier; storing the queue associated with the timestamp information in a cache; when a queue with the same queue identifier is stored in the cache again within a specified period, merge the queues with the same queue identifier.
[0046] As an optional implementation manner of this embodiment, processing the consumption information of the target enterprise in the queue includes: determining the priority of queue processing based on the associated timestamp information and processing the queue based on the priority.
[0047] As an optional implementation manner of this embodiment, processing the consumption information of the target enterprise in the queue includes: calling the account of the target enterprise based on the ID of the target enterprise; and processing the consumption information based on the consumption information of the target enterprise and the account information.
[0048] According to an embodiment of the present invention, the present invention also provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to implement the method described in any of the above embodiments.
[0049] According to an embodiment of the present invention, the present invention also provides a readable storage medium storing computer instructions for enabling a computer to implement the method described in any of the above embodiments when executed.
[0050] According to an embodiment of the present invention, the present invention also provides a computer program product, and the computer program can implement the method described in any of the above embodiments when executed by a processor.
[0051] Figure 2 FIG. shows a schematic block diagram of an exemplary electronic device 300 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices.
[0052] As Figure 2 shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0053] A plurality of components in the electronic device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a magnetic disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0054] The computing unit 301 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 executes the various methods and processes described above, such as the object matching method. For example, in some embodiments, the object matching method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded into the RAM 303 and executed by the computing unit 301, one or more steps of the methods described above can be executed.
[0055] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0056] The program code for implementing the methods of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to the processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program codes can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0057] In the context of the present invention, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Claims
1. A method for processing enterprise consumption information, characterized in that: The method realizes one-click submission of C-end enterprises, pre-builds an interface for B-end enterprises, and can realize the consumption information processing request sent by B-end enterprises through the interface. Any B-end enterprise can be associated with multiple enterprises, namely C-end enterprises. C-end enterprises can send a first consumption request to their B-end enterprises. The consumption information indicated by the first consumption request and the ID information of the enterprise can be used to form a queue. The method includes: In response to the consumption request of the enterprise obtained by the pre-built interface, a unique identifier is constructed for the enterprise, wherein a visualization configuration page is provided for the B-end, in which all C-end enterprises associated with the B-end can be presented after the B-end enterprise logs in, and if any C-end enterprise sends a consumption request to the B-end enterprise, the C-end enterprise is identified in the visualization configuration page, so that the B-end enterprise user can select all or part of the identified C-end enterprises, and generate consumption requests for the selected C-end enterprises, including building a queue for the C-end enterprises; Parsing the consumption request to obtain a queue corresponding to the enterprise, wherein the queue includes consumption information of a target enterprise associated with the enterprise and ID information of the target enterprise; Processing consumption information of the target enterprise in the queue, and sending the processing result to the enterprise through the pre-built interface based on the unique identifier, wherein processing consumption information of the target enterprise in the queue includes: calling the account of the target enterprise based on the ID of the target enterprise; processing consumption information based on the consumption information of the target enterprise and the account information; During processing, the account information of the target enterprise is called based on the ID, and the account information is processed based on the consumption information.
2. The consumption information processing method according to claim 1, characterized in that: The method further comprises: Providing presentation page data to the enterprise so that the enterprise end of the enterprise can present a visual configuration page; Among them, the enterprises associated with the enterprise are presented in the visualization configuration page; if there is an associated enterprise among the associated enterprises that sends a first consumption request to the server corresponding to the enterprise, the associated enterprises are distinguished and identified in the visualization configuration page; it is monitored whether the associated enterprise with the distinguishing mark is selected; if it is selected, the consumption request is generated.
3. The consumption information processing method according to claim 1, characterized in that: If selected, the consumption request is generated including: Obtaining the ID corresponding to the selected associated enterprise from the database, and obtaining the consumption information of the corresponding first consumption request from the log; A queue is constructed based on the ID corresponding to the associated enterprise and the consumption information of the first consumption request corresponding to the associated enterprise to generate the consumption request.
4. The consumption information processing method according to claim 1, characterized in that: After obtaining the queue corresponding to the enterprise, the following steps are included: Add a queue identifier to the queue corresponding to the enterprise, and associate timestamp information with the queue, wherein the queue identifier is consistent with the unique identifier; and store the queue associated with the timestamp information in a cache; When a queue with the same queue ID is stored in the cache again within a specified period, the queues with the same queue ID are merged.
5. The consumption information processing method according to claim 4, characterized in that: Processing consumption information of the target enterprise in the queue includes: determining a priority of queue processing based on associated timestamp information, and processing the queue based on the priority.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 5.
7. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the method described in any one of claims 1-5.
8. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Industrial interconnection platform message queue deployment method and device based on identification analysis
CN115379012A
Transaction processing method and device and storage medium
CN117011057A