WO2019019676A1 - 业务编号分配方法、装置、计算机设备和存储介质 - Google Patents

业务编号分配方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2019019676A1
WO2019019676A1 PCT/CN2018/080169 CN2018080169W WO2019019676A1 WO 2019019676 A1 WO2019019676 A1 WO 2019019676A1 CN 2018080169 W CN2018080169 W CN 2018080169W WO 2019019676 A1 WO2019019676 A1 WO 2019019676A1
Authority
WO
WIPO (PCT)
Prior art keywords
service number
service
user account
queue
allocation
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.)
Ceased
Application number
PCT/CN2018/080169
Other languages
English (en)
French (fr)
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to SG11201913403PA priority Critical patent/SG11201913403PA/en
Publication of WO2019019676A1 publication Critical patent/WO2019019676A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Definitions

  • the present application relates to the field of data processing technologies, and in particular, to a service number allocation method, apparatus, computer device, and storage medium.
  • the traditional service number allocation technology allocates the generated service number to the user by randomly generating the service number. As the number of services increases, the number of required service numbers increases.
  • the randomly generated service numbers are used to allocate randomly generated service numbers. The probability of repeated assignment of service numbers is high.
  • a service number assignment method In accordance with various embodiments of the present application, a service number assignment method, apparatus, computer apparatus, and non-transitory computer readable storage medium are provided.
  • a method for assigning service numbers including:
  • the extracted service number is assigned to the user account.
  • a service number distribution device comprising:
  • a quantity obtaining module configured to obtain a number of service number generation
  • a number generation module configured to generate a service number according to the number generated by the service number
  • a queue adding module configured to add the generated service number to the number allocation queue
  • Requesting an acquisition module configured to obtain a service number allocation request
  • a quantity extraction module configured to extract a request allocation quantity and a user account in the service number allocation request
  • a number extraction module configured to sequentially extract a service number from the number allocation queue according to the requested allocation quantity
  • the number assignment module is configured to allocate the extracted service number to the user account.
  • a computer device comprising a memory, a processor, and computer instructions stored on the memory and operative on the processor, the processor executing the computer instructions to:
  • the extracted service number is assigned to the user account.
  • a non-transitory computer readable storage medium having stored thereon computer instructions, wherein the computer instructions, when executed by a processor, implement the following steps:
  • the extracted service number is assigned to the user account.
  • 1 is an application environment diagram of a service number assignment method according to one or more embodiments
  • FIG. 2 is a structural block diagram of a server in a service number distribution system in accordance with one or more embodiments
  • FIG. 3 is a schematic flow chart of a method for assigning a service number according to one or more embodiments
  • FIG. 4 is a flow diagram showing the steps of generating a winning notification in accordance with one or more embodiments
  • FIG. 5 is a flow diagram showing the steps of generating a service end notification in accordance with one or more embodiments
  • FIG. 6 is a flow chart showing the steps of extracting a winning service number according to one or more embodiments
  • FIG. 7 is a structural block diagram of a service number assigning apparatus according to one or more embodiments.
  • Figure 8 is a block diagram showing the structure of a service number assigning device in another embodiment.
  • FIG. 1 is an application environment diagram of a service number allocation method in an embodiment.
  • the service number assignment method is applied to a service number assignment system.
  • the service number distribution system includes a terminal 110, a terminal 120, and a server 130, wherein the terminal 110 and the terminal 120 are connected to the server 130 through a network.
  • the terminal 110 and the terminal 120 may be a fixed terminal or a mobile terminal, and the fixed terminal may specifically be at least one of a printer, a scanner and a monitor, and the mobile terminal may specifically be a tablet computer, a smart phone, a personal data assistant, and a digital camera. At least one.
  • FIG. 2 is a schematic diagram showing the internal structure of the server 130 in the service number distribution system of FIG. 1 in an embodiment.
  • the server 130 includes a processor, memory, and network interface connected by a system bus.
  • the processor of server 130 is used to provide computing and control capabilities to support the operation of the entire server 130
  • the memory is used to store data, code instructions, etc.
  • the network interface is used for network communication with terminal 110 and terminal 120.
  • At least one computer instruction is stored on the memory, and the computer instruction can be executed by the processor to implement the service number assignment method applicable to the server 120 provided in the embodiment of the present application.
  • the memory may include a non-volatile computer readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • a memory includes a non-transitory computer readable storage medium and an internal memory; the non-transitory computer readable storage medium stores an operating system and computer instructions executable by the processor to implement The above service number assignment method; the internal memory provides a cached operating environment for an operating system and computer instructions in a non-transitory computer readable storage medium.
  • FIG. 2 is only a schematic diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied.
  • the specific server may include More or fewer components are shown in Figure 2, or some components are combined, or have different component arrangements.
  • a method for assigning a service number is provided.
  • the method is applied to the server 130 for example.
  • the method specifically includes the following content:
  • the service personnel log in to the service information input page of the terminal 110 by inputting the business personnel account and password, and the business person inputs the service number generation quantity in the business information input page.
  • the terminal 110 will obtain the input service number generation quantity, and send the acquired service number generation quantity to the server 130.
  • the server 130 receives the number of service number generations sent by the terminal 110.
  • the service personnel inputs service information in the service input page of the terminal 110, the service information includes the target price, and may further include at least one of a service name, a target name, and a service effective time.
  • the terminal 110 acquires the input service information and transmits the service information to the server 130.
  • the server 130 receives the service information sent by the terminal 110, extracts the target price in the service information, and determines the number of the service number generated according to the extracted target price.
  • the server 130 extracts the target price and the number quantity determination manner from the service information, and determines the service number generation quantity according to the extracted target price and the number quantity determination manner.
  • the price of the mobile phone is 5,000 yuan. If the number of the number is determined by dividing the price of the target price by 2, the number is generated by the number of the service number, that is, 5000 is divided by 2 to obtain 2500, and the number of the service number is 2 2500; If the number of numbers is determined by generating the quantity for the service number of the target price, the number of the determined service number is 5000.
  • S304 Generate a service number according to the number generated by the service number.
  • server 130 generates a service number that matches the number of service number generations in numerical order.
  • the number of digits of the service number generated by the server 130 may be the same. For example, if the number of service numbers generated is 10, 10 "00, 01, 02, 03, 04, 05, 06, 07, 08, and 09" traffic numbers including 2 digits are generated.
  • the server 130 acquires a corresponding service number random generation algorithm, and generates a service number that matches the number of service number generation according to the random generation algorithm and that does not exist.
  • the server 130 randomly extracts a service number from the generated service number, adds the extracted service number to the number allocation queue, and then proceeds from the remaining services.
  • a service number is extracted from the number, and the extracted service number is added to the number assignment queue until all the generated service numbers are added to the number assignment queue.
  • S306 specifically includes the steps of: converting the generated service number into an unordered service number; and adding the unordered service number to the number assignment queue.
  • the server 130 invokes a data breaking algorithm to perform data breaking processing on all generated service numbers to obtain an unordered service number, and the unordered service number is Add a number in the allocation queue.
  • the user enters a user account at the terminal 120 to log in to the service number acquisition page, and enters a request allocation number of the service number in the service number acquisition page.
  • the terminal 120 obtains the number of request allocations entered in the service number acquisition page and the registered user account, generates a service number allocation request according to the requested allocation quantity and the registered user account, and sends the generated service number allocation request to the server 130.
  • the server 130 receives the service number assignment request sent by the terminal 120.
  • the requested allocation quantity refers to the number of user requests corresponding to the user account assigned to the service number.
  • the server 130 parses the number assignment request, and extracts the request allocation number and the user account in the number assignment request by parsing.
  • the server 130 extracts the same number of service numbers from the number assignment queue as the number of request allocations in the order in which the service numbers in the number assignment queue are arranged according to the number of request allocations extracted from the number assignment request.
  • the server 130 generates a number assignment success notification according to the service number extracted from the number queue, sends a number assignment success notification to the terminal 120 logged in with the user account, and associates the extracted service number with the user account. Store the generated number assignment record.
  • a service number is generated according to the service number generation quantity, and a sufficient service number that can be allocated is ensured.
  • the generated service number is added to the number assignment queue.
  • the service number is extracted from the number assignment queue according to the requested allocation quantity in the service number assignment request, and the extracted service number is assigned to the service number assignment.
  • the service number is extracted in order from the number assignment queue to ensure that the extracted service numbers do not overlap. This reduces the probability of repeated service number assignment and improves the accuracy of service number assignment. Sex.
  • the method further includes the step of generating a winning notification, and the step specifically includes the following:
  • the server 130 after the server 130 assigns the mentioned service number to the user account, it detects whether there is a service number to be allocated in the number allocation queue. If there is a service number to be allocated, it indicates that the number is assigned in the column. If the service number is not assigned, if there is no service number to be assigned, it indicates that the service number in the number assignment queue has been allocated.
  • the server 130 after the server 130 assigns the extracted service number to the user account, the server 130 cumulatively counts the number of the assigned service numbers, and compares the generated quantity of the counted service numbers after each count is completed. When the counted quantity is equal to the number of service number generation, it indicates that the service number in the number assignment queue has been allocated; when the counted quantity is less than the number of service number generation, it indicates that the service number in the number assignment pair column is not allocated.
  • the server 130 sets an unassigned number count in the number assignment queue, and the initial value of the unassigned number count is the number of service number generations. After the server 130 extracts the service number from the number assignment pair column, the server 130 The allocation number count minus the number of extractions for the service number. When the server 130 detects that the value of the unassigned number count is 0, it indicates that the service number in the number assignment queue has been allocated; when the server 130 detects that the value of the unassigned number count is not 0, it indicates that the number assignment is in the column. The service number is not assigned.
  • S402 specifically includes the step of detecting whether the service number in the number assignment queue is allocated within a preset time.
  • the server 130 starts timing when the generated service number is added to the number assignment queue, and detects whether the service queue in the number assignment queue is allocated when the counted time reaches the preset time.
  • the server 130 when detecting that the service number in the number assignment queue is allocated, the server 130 extracts a preset number of service numbers from the generated service number, and uses the extracted service number as the winning service number.
  • the preset number of service numbers may be randomly selected, or may be extracted according to a preset rule.
  • the server 130 allocates the invoiced service number in the record according to the number of the service number, and obtains the user account corresponding to the winning service number from the number assignment record, and the obtained user account is the user account assigned to the invoiced service number.
  • S408 Generate a winning notification according to the winning service number and the queried user account.
  • the server 130 encapsulates the winning service number and the queried user account, and generates a winning notification by encapsulation.
  • the winning notice may further include at least one of a business name, subject information, and a winning time.
  • the server 130 determines the terminal address corresponding to the terminal logged in by the queried user account, and sends the winning notification to the terminal logged in with the queried user account according to the determined terminal address.
  • the winning service number is extracted from the generated service number, and the winning service notification is generated according to the winning service number and the user account assigned to the winning service number, and the winning notification is notified.
  • Sending to the terminal that is logged in with the user account assigned to the winning service number ensures that the winning user is notified in time after the number of the winning business number is extracted, and the efficiency of the winning notification is improved.
  • the method further includes the step of generating a service end notification, where the step specifically includes the following:
  • the server 130 starts timing when the generated service number is added to the number assignment queue, and detects whether the service queue in the number assignment queue is allocated when the counted time reaches the preset time.
  • the service is terminated when it is detected that the service number in the number assignment queue is not allocated within the preset time.
  • the server 130 obtains the assigned service number and the user account corresponding to the assigned service number from the number assignment record.
  • the obtained user account is a user account that has been assigned to the service number.
  • the server 130 generates a service end notification according to the acquired assigned service number and the user account corresponding to the assigned service number.
  • the business end notification may also include a reason for the end of the business.
  • the server 130 queries a plurality of service numbers corresponding to the acquired user accounts in the number assignment record, and generates a service end notification according to the obtained user account and the plurality of service numbers that are queried.
  • the server 130 queries the terminal address corresponding to the terminal that is logged in with the obtained user account, and sends a service end notification to the terminal that is logged in with the obtained user account according to the queried terminal address.
  • the service corresponding to the service number is terminated, and the service corresponding to the service without the complete service number is avoided in the preset time.
  • Computing resources Obtaining the user account corresponding to the assigned service number, generating a service end notification according to the obtained user account and the corresponding assigned service number, and transmitting the service end notification to the terminal that is logged in with the obtained user account, ensuring that the notification of ending the service is timely Notify the user corresponding to the assigned service number.
  • S404 specifically includes the step of extracting a winning service number, and the step specifically includes the following:
  • the server 130 number distribution record selects a preset number of user accounts, and the selected user account is a user account that has been assigned to the service number.
  • the server 130 can randomly select a preset number of user accounts.
  • the server 130 records, in the number assignment record, the selected service number assigned time for each user account assigned to the service number.
  • the server 130 may also sort the user accounts according to the service number allocation time, and select the preset number of user accounts ranked first or last. For example, the user accounts are sorted according to the service number allocation time, and the last 50 user accounts are selected.
  • the server 130 obtains the service number allocation time and the assigned service number corresponding to each selected user account from the number assignment record.
  • the service number allocation time is represented by a digit string of the same number of data bits. For example, the service number allocation time is 14:23, 39 seconds, on May 11, 2017, and is represented by a digit string 20170511142339 including 14 digits.
  • the server 130 adds all the obtained service number allocation times and the allocated service numbers, and adds the sum obtained by dividing the sum of the service numbers, and obtains the sum obtained by dividing the number generated by the service number.
  • the remainder obtained is determined based on the obtained remainder.
  • the plurality of winning service numbers may also be determined according to the obtained remainder.
  • a preset number of user accounts are selected, and the service number of the service number corresponding to the user account and the assigned service number are determined by calculation to determine the winning service number, thereby ensuring the fairness of the extracted business number;
  • the service number is used, the duplicated number of the winning business number is avoided, and the accuracy of determining the winning business number is improved.
  • the service personnel log in to the terminal 110 by using the service personnel account, and input the service information through the terminal 110.
  • the service information includes the target information, and the target information includes at least one of the target name, the target price, and the detailed parameter of the target.
  • the title of the object is a mobile phone, and the price of the subject matter is 5,000 yuan.
  • the detailed parameters of the target include parameters such as memory capacity, screen size and processor model.
  • the terminal 110 transmits the input service information to the server 130.
  • the server 130 determines the number of business number generation 5000 business numbers based on the target price of 5,000 yuan, and each business number requires the user to spend 1 yuan to purchase.
  • the server 130 converts the generated 5000 service numbers into an unordered service number, and adds the unordered service number to the number assignment queue.
  • the user logs in to the terminal 120 through the user account, and enters the number of purchased service numbers through the terminal 120.
  • the server 130 obtains a service number allocation request, where the service number assignment request includes the number of purchase service numbers corresponding to the user account and the user account, and the server 130 numbers from the number of the purchased service number.
  • the service number is extracted from the allocation queue, and the extracted service number is assigned to the user account in the service number allocation request.
  • the server 130 After detecting the assignment of the service number in the number assignment queue, the server 130 extracts the invoice service number from all the generated service numbers, queries the user account corresponding to the invoice service number, and sends a notification to the terminal that logs in with the user account. The user exchanges the received winning notice as a voucher and exchanges the mobile phone with a price of 5,000 yuan.
  • FIGS. 3-6 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIGS. 3-6 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, these sub-steps or stages The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
  • a service number distribution apparatus 700 is provided.
  • the apparatus specifically includes the following: a quantity acquisition module 702, a number generation module 704, a queue addition module 706, a request acquisition module 708, and quantity extraction.
  • the quantity obtaining module 702 is configured to obtain a number of service number generation.
  • the number generation module 704 is configured to generate a service number according to the service number generation quantity.
  • the queue adding module 706 is configured to add the generated service number to the number allocation queue.
  • the request obtaining module 708 is configured to obtain a service number allocation request.
  • the quantity extraction module 710 is configured to extract the requested allocation quantity and the user account in the service number allocation request.
  • the number extraction module 712 is configured to extract the service number from the number allocation queue in order according to the requested allocation quantity.
  • the number assignment module 714 is configured to allocate the extracted service number to the user account.
  • the queue addition module is further configured to convert the generated service number into an unordered service number; add the unordered service number to the number assignment queue.
  • a service number is generated according to the service number generation quantity, and a sufficient service number that can be allocated is ensured.
  • the generated service number is added to the number assignment queue.
  • the service number is extracted from the number assignment queue according to the requested allocation quantity in the service number assignment request, and the extracted service number is assigned to the service number assignment.
  • the service number is extracted in order from the number assignment queue to ensure that the extracted service numbers do not overlap. This reduces the probability of repeated service number assignment and improves the accuracy of service number assignment. Sex.
  • the service number distribution apparatus 700 specifically includes the following: a queue detection module 716 , a winning extraction module 718 , an account inquiry module 720 , a notification generation module 722 , and a notification sending module 724 .
  • the queue detection module 716 is configured to detect whether the service number in the number assignment queue is allocated.
  • the winning extraction module 718 is configured to extract the winning service number from the generated service number if it is detected that the service number in the number allocation queue is allocated.
  • the account inquiry module 720 is configured to query the user account assigned to the winning service number.
  • the notification generating module 722 is configured to generate a winning notification according to the winning service number and the queried user account.
  • the notification sending module 724 is configured to send the winning notification to the terminal that logs in with the queried user account.
  • the queue detection module 716 is further configured to detect whether the service number in the number assignment queue is allocated within a preset time.
  • the account query module 720 is further configured to detect that the service number in the number assignment queue is not allocated, and obtain the user account corresponding to the assigned service number.
  • the notification generating module 722 is further configured to generate a service end notification according to the obtained user account and the corresponding allocated service number.
  • the notification sending module 724 is further configured to send a service end notification to the terminal that logs in with the obtained user account.
  • the winning service number is extracted from the generated service number, and the winning service notification is generated according to the winning service number and the user account assigned to the winning service number, and the winning notification is notified.
  • Sending to the terminal that is logged in with the user account assigned to the winning service number ensures that the winning user is notified in time after the number of the winning business number is extracted, and the efficiency of the winning notification is improved.
  • the service corresponding to the service number is terminated, and the operation resources that are not occupied by the service corresponding to the complete service number in the preset time are avoided.
  • the winning extraction module 718 is further configured to select a preset number of user accounts that have been assigned to the service number; obtain the service number allocation time and the assigned service number corresponding to each selected user account; The business number assignment time and the assigned service number determine the winning business number.
  • a preset number of user accounts are selected, and the service number of the service number corresponding to the user account and the assigned service number are determined by calculation to determine the winning service number, thereby ensuring the fairness of the extracted business number;
  • the service number is used, the duplicated number of the winning business number is avoided, and the accuracy of determining the winning business number is improved.
  • the network interface may be an Ethernet card or a wireless network card.
  • the above modules may be embedded in the hardware in the terminal or in the memory in the terminal, or may be stored in the memory in the terminal in a software form, so that the processor can call the operations corresponding to the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • a computer device comprising a memory, a processor, and computer instructions stored on the memory and operable on the processor, the processor executing the computer instruction to: obtain a number of service number generation; generate a quantity generation according to the service number The service number is added to the number allocation queue; the service number allocation request is obtained; the request allocation quantity and the user account in the service number allocation request are extracted; and the service number is extracted from the number allocation queue in order according to the requested allocation quantity; Assign the extracted service number to the user account.
  • adding the generated service number to the number assignment queue includes: converting the generated service number into an unordered service number; adding the unordered service number to the number assignment queue.
  • the processor further implements the following steps: detecting whether the service number in the number assignment queue is allocated; and detecting the service number in the number assignment queue. After being assigned, the winning business number is extracted from the generated service number; the user account assigned to the winning business number is queried; the winning notification is generated according to the winning business number and the queried user account; and the winning notification is sent to the queried user account. Login terminal.
  • the processor further implements the following steps: detecting whether the service number in the number assignment queue is allocated within a preset time; detecting the number assignment The service number in the queue is not allocated, and the user account corresponding to the assigned service number is obtained. The service end notification is generated according to the obtained user account and the corresponding assigned service number; and the service end notification is sent to the obtained user account. Login terminal.
  • extracting the winning service number from the generated service number includes: selecting a preset number of user accounts that have been assigned to the service number; and obtaining the assigned service number and time of each selected user account. Service number; determine the winning service number based on the obtained service number assignment time and the assigned service number.
  • a service number is generated according to the service number generation quantity, and a sufficient service number that can be allocated is ensured.
  • the generated service number is added to the number assignment queue.
  • the service number is extracted from the number assignment queue according to the requested allocation quantity in the service number assignment request, and the extracted service number is assigned to the service number assignment.
  • the service number is extracted in order from the number assignment queue to ensure that the extracted service numbers do not overlap. This reduces the probability of repeated service number assignment and improves the accuracy of service number assignment. Sex.
  • a non-transitory computer readable storage medium having computer instructions stored thereon, wherein when the computer instructions are executed by the processor, the following steps are performed: obtaining a number of service number generations; generating a quantity generation service number according to the service number Adding the generated service number to the number assignment queue; obtaining the service number assignment request; extracting the request allocation quantity and the user account in the service number assignment request; extracting the service number from the number assignment queue in order according to the requested allocation quantity; The business number to be assigned is assigned to the user account.
  • adding the generated service number to the number assignment queue includes: converting the generated service number into an unordered service number; adding the unordered service number to the number assignment queue.
  • the processor further performs the following steps: detecting whether the service number in the number assignment queue is allocated; if it is detected that the service number in the number assignment queue is allocated, The winning service number is extracted from the generated service number; the user account assigned to the winning service number is queried; the winning notification is generated according to the winning business number and the queried user account; and the winning notification is sent to the terminal logged in with the queried user account.
  • the processor further performs the steps of: detecting whether the service number in the number assignment queue is allocated within a preset time; detecting the service in the number assignment queue After the number is not assigned, the user account corresponding to the assigned service number is obtained; the service end notification is generated according to the obtained user account and the corresponding assigned service number; and the service end notification is sent to the terminal that is logged in with the obtained user account.
  • extracting the winning service number from the generated service number includes: selecting a preset number of user accounts that have been assigned to the service number; and obtaining the assigned service number and time of each selected user account. Service number; determine the winning service number based on the obtained service number assignment time and the assigned service number.
  • a service number is generated according to the service number generation quantity, and a sufficient service number that can be allocated is ensured.
  • the generated service number is added to the number assignment queue.
  • the service number is extracted from the number assignment queue according to the requested allocation quantity in the service number assignment request, and the extracted service number is assigned to the service number assignment.
  • the service number is extracted in order from the number assignment queue to ensure that the extracted service numbers do not overlap. This reduces the probability of repeated service number assignment and improves the accuracy of service number assignment. Sex.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种业务编号分配方法,包括:获取业务编号生成数量;根据所述业务编号生成数量生成业务编号;将生成的业务编号添加到编号分配队列中;获取业务编号分配请求;提取所述业务编号分配请求中的请求分配数量和用户账号;根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;将提取到的业务编号分配至所述用户账号。

Description

业务编号分配方法、装置、计算机设备和存储介质
本申请要求于2017年7月24日提交中国专利局、申请号为2017106085172、发明名称为“业务编号分配方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,特别是涉及一种业务编号分配方法、装置、计算机设备和存储介质。
背景技术
随着互联网技术的发展,可在互联网上办理的业务越来越多,一些业务处理过程中,需要为用户分配业务编号。
传统的业务编号分配技术,通过随机生成业务编号,将生成的业务编号分配给用户。随着业务数量的增长,对业务编号的需求数量越来越多,利用随机生成的业务编号,对随机生成的业务编号进行分配,出现业务编号重复分配的概率较高。
发明内容
根据本申请的各种实施例,提供一种业务编号分配方法、装置、计算机设备和非易失性计算机可读存储介质。
一种业务编号分配方法,包括:
获取业务编号生成数量;
根据所述业务编号生成数量生成业务编号;
将生成的业务编号添加到编号分配队列中;
获取业务编号分配请求;
提取所述业务编号分配请求中的请求分配数量和用户账号;
根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
将提取到的业务编号分配至所述用户账号。
一种业务编号分配装置,包括:
数量获取模块,用于获取业务编号生成数量;
编号生成模块,用于根据所述业务编号生成数量生成业务编号;
队列添加模块,用于将生成的业务编号添加到编号分配队列中;
请求获取模块,用于获取业务编号分配请求;
数量提取模块,用于提取所述业务编号分配请求中的请求分配数量和用户账号;
编号提取模块,用于根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
编号分配模块,用于将提取到的业务编号分配至所述用户账号。
一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机指令,所述处理器执行所述计算机指令时实现以下步骤:
获取业务编号生成数量;
根据所述业务编号生成数量生成业务编号;
将生成的业务编号添加到编号分配队列中;
获取业务编号分配请求;
提取所述业务编号分配请求中的请求分配数量和用户账号;
根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
将提取到的业务编号分配至所述用户账号。
一种非易失性计算机可读存储介质,其上存储有计算机指令,其特征在于,所述计算机指令被处理器执行时实现以下步骤:
获取业务编号生成数量;
根据所述业务编号生成数量生成业务编号;
将生成的业务编号添加到编号分配队列中;
获取业务编号分配请求;
提取所述业务编号分配请求中的请求分配数量和用户账号;
根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
将提取到的业务编号分配至所述用户账号。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为根据一个或多个实施例中业务编号分配方法的应用环境图;
图2为根据一个或多个实施例中业务编号分配系统中的服务器的结构框图;
图3为根据一个或多个实施例中业务编号分配方法的流程示意图;
图4为根据一个或多个实施例中生成中签通知的步骤的流程示意图;
图5为根据一个或多个实施例中生成业务结束通知的步骤的流程示意图;
图6为根据一个或多个实施例中抽取中签业务编号的步骤的流程示意图;
图7为根据一个或多个实施例中业务编号分配装置的结构框图;
图8为另一个实施例中业务编号分配装置的结构框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中业务编号分配方法的应用环境图。参照图1,该业务编号分配方法应用于业务编号分配系统。业务编号分配系统包括终端110、终端120和服务器130,其中终端110和终端120通过网络与服务器130连接。终端110和终端120可以是固定终端或移动终端,固定终端具体可以是打印机、扫描仪和监控器中的至少一种,移动终端具体可以是平板电脑、智能手机、个人数据助理和数码相机中的至少一种。
图2为一个实施例中图1业务编号分配系统中的服务器130的内部结构示意图。如图2所示,该服务器130包括通过系统总线连接的处理器、存储器和网络接口。服务器130的处理器用于提供计算和控制能力,支撑整个服务器130的运行,存储器用于存储数据、代码指令等,网络接口用于与终端110和终端120进行网络通信。存储器上存储有至少一个计算机指令,该计算机指令可被处理器执行,以实现本申请实施例中提供的适用于服务器120的业务编号分配方法。存储器可包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性计算机可读存储介质,或随机存储记忆体(Random Access Memory,RAM)等。例如,在一些实施例中,存储器包括非易失性计算机可读存储介质及内存储器;非易失性计算机可读存储介质存储有操作系统和计算机指令,该计算机指令可被处理器执行以实现上述的业务编号分配方法;内存储器为非易失性计算机可读存储介质中的操作系统及计算机指令提供高速缓存的运行环境。
本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的示意图,并不构成对本申请方案所应用于其上的服务器的限定,具体的服务器可以包括比图2中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
如图3所示,在一些实施例中,提供一种业务编号分配方法,本实施例以该方法应用在服务器130中来举例说明,该方法具体包括以下内容:
S302,获取业务编号生成数量。
在一些实施例中,业务人员通过输入业务人员账号和密码登录到终端110的业务信息输入页面,业务人员在业务信息输入页面中输入业务编号生成数量。终端110将获取输入的业务编号生成数量,将获取的业务编号生成数量发送至服务器130。服务器130接收终 端110发送的业务编号生成数量。
在一些实施例中,业务人员在终端110的业务输入页面中输入业务信息,业务信息包括标的物价格,还可以包括业务名称、标的物名称和业务有效时间中的至少一种。终端110获取输入的业务信息,将业务信息发送至服务器130。服务器130接收终端110发送的业务信息,提取业务信息中的标的物价格,根据提取到的标的物价格确定业务编号生成数量。
在另一个实施例中,服务器130从业务信息中提取标的物价格和编号数量确定方式,根据提取到的标的物价格和编号数量确定方式确定业务编号生成数量。
举例说明,标的物为手机,手机的价格为5000元,若编号数量确定方式为以标的物价格除以2得到的数字为业务编号生成数量,即5000除以2得到2500,业务编号生成数量为2500;若编号数量确定方式为以标的物价格为业务编号生成数量,即确定的业务编号生成数量为5000。
S304,根据业务编号生成数量生成业务编号。
在一些实施例中,服务器130按照编号顺序生成与业务编号生成数量相匹配的业务编号。其中,服务器130生成的业务编号的数字位数可以相同。例如,业务编号生成数量为10个,则生成“00、01、02、03、04、05、06、07、08和09”10个包括2个数字位的业务编号。
在一些实施例中,服务器130获取对应的业务编号随机生成算法,根据随机生成算法生成与业务编号生成数量相匹配且不存在重复的业务编号。
S306,将生成的业务编号添加到编号分配队列中。
具体的,服务器130在生成与业务编号生成数量相匹配的业务编号后,随机从生成的业务编号中抽取一个业务编号,将抽取到的业务编号添加到编号分配队列中,再从剩下的业务编号中抽取一个业务编号,再将抽取到的业务编号添加到编号分配队列中直至将生成的所有业务编号添加到编号分配队列中。
在一些实施例中,S306具体还包括以下步骤:将生成的业务编号转换为无序的业务编号;将无序的业务编号添加到编号分配队列中。
在一些实施例中,服务器130在生成与业务编号数量匹配的业务编号后,调用数据打散算法,将生成的所有业务编号进行数据打散处理得到无序的业务编号,将无序的业务编号添加编号分配队列中。
S308,获取业务编号分配请求。
在一些实施例中,用户在终端120输入用户账号登录到业务编号获取页面,在业务编号获取页面中输入业务编号的请求分配数量。终端120获取业务编号获取页面中输入的请求分配数量和登录的用户账号,根据请求分配数量和登录的用户账号生成业务编号分配请求,将生成的业务编号分配请求发送至服务器130。服务器130接收终端120发送的业务编号分配请求。请求分配数量是指用户账号对应的用户请求分配到业务编号的数量。
S310,提取业务编号分配请求中的请求分配数量和用户账号。
在一些实施例中,服务器130在接收到终端120发送的编号分配请求后,对编号分配请求进行解析,通过解析提取编号分配请求中的请求分配数量和用户账号。
S312,根据请求分配数量按顺序从编号分配队列中提取业务编号。
在一些实施例中,服务器130根据从编号分配请求提取的请求分配数量,按编号分配队列中业务编号的排列顺序从编号分配队列中提取与请求分配数量相同数量的业务编号。
S314,将提取到的业务编号分配至用户账号。
在一些实施例中,服务器130根据从编号队列中提取到的业务编号生成编号分配成功通知,将编号分配成功通知发送至以用户账号登录的终端120,并将提取到的业务编号与用户账号对应存储生成编号分配记录。
本实施例中,根据业务编号生成数量生成业务编号,保证足够可分配的业务编号。将生成的业务编号添加到编号分配队列中,在获取业务编号分配请求后,根据业务编号分配请求中的请求分配数量从编号分配队列中提取业务编号,将提取到的业务编号分配至业务编号分配请求中的用户账号。在业务编号分配过程中,通过从编号分配队列中按顺序提取业务编号,保证提取到的业务编号不会出现重复的情况,从而降低了出现业务编号重复分配的概率,提高了业务编号分配的准确性。
如图4所示,在一些实施例中,S314之后具体还包括生成中签通知的步骤,该步骤具体包括以下内容:
S402,检测编号分配队列中业务编号是否分配完毕。
在一些实施例中,服务器130在将提到的业务编号分配至用户账号后,检测编号分配队列中是否存在待分配的业务编号,若存在待分配的业务编号,则表示编号分配对列中的业务编号未分配完毕;如不存在待分配的业务编号,则表示编号分配队列中的业务编号已分配完毕。
在一些实施例中,服务器130在将提取到的业务编号分配至用户账号后,对已分配的业务编号数量进行累计计数,在每次计数完毕后,将所计数量业务编号生成数量相比较,当所计数量与业务编号生成数量相等时,表示编号分配队列中的业务编号已分配完毕;当所计数量小于业务编号生成数量时,表示编号分配对列中的业务编号未分配完毕。
在另一实施例中,服务器130在编号分配队列中设置有未分配编号计数,未分配编号计数的初始值为业务编号生成数量,在服务器130从编号分配对列中提取业务编号后,将未分配编号计数减去业务编号的提取数量。服务器130在检测到未分配编号计数的值为0时,表示编号分配队列中的业务编号已分配完毕;服务器130在检测到未分配编号计数的值不为0时,表示编号分配对列中的业务编号未分配完毕。
在一些实施例中,S402具体包括以下步骤:检测在预设时间内编号分配队列中的业务编号是否分配完毕。
在一些实施例中,服务器130在将生成的业务编号添加到编号分配队列中时,开始计时,当所计时间达到预设时间时,检测编号分配队列中的业务队列是否被分配完毕。
S404,若检测到编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号。
在一些实施例中,服务器130在检测到编号分配队列中的业务编号被分配完毕时,从生成的业务编号中抽取预设数量的业务编号,以抽取的业务编号作为中签业务编号。其中,抽取预设数量的业务编号可以是随机抽取,也可以是按照预设规则抽取。
S406,查询分配到中签业务编号的用户账号。
在一些实施例中,服务器130根据业务编号的编号分配记录中查询中签业务编号,从编号分配记录中获取中签业务编号对应的用户账号,获取到的用户账号为分配到中签业务编号的用户账号。
S408,根据中签业务编号和查询到的用户账号生成中签通知。
在一些实施例中,服务器130对中签业务编号和查询到的用户账号进行封装,通过封装生成中签通知。中签通知中还可以包括业务名称、标的物信息和中签过期时间中的至少一种。
S410,将中签通知发送至以查询到的用户账号登录的终端。
在一些实施例中,服务器130确定以查询到的用户账号登录的终端所对应的终端地址,根据确定的终端地址将中签通知发送至以查询到的用户账号登录的终端。
本实施例中,在检测到编号分配队列中的业务编号分配完毕后,从生成的业务编号中抽取中签业务编号,根据中签业务编号和分配到中签业务编号的用户账号生成中签通知,将中签通知发送至以分配到中签业务编号的用户账号登录的终端,保证在抽取到中签业务编号后,及时通知中签用户,提高了中签通知效率。
如图5所示,在一些实施例中,S314之后具体还包括生成业务结束通知的步骤,该步骤具体包括以下内容:
S502,检测在预设时间内编号分配队列中的业务编号是否分配完毕。
在一些实施例中,服务器130在将生成的业务编号添加到编号分配队列中时,开始计时,当所计时间达到预设时间时,检测编号分配队列中的业务队列是否被分配完毕。
S504,检测到编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号。
在一些实施例中,当检测到在预设时间内编号分配队列中的业务编号未被分配完毕时,结束该业务。服务器130从编号分配记录中获取已分配业务编号和已分配业务编号所对应的用户账号。其中,获取的用户账号为已经分配到业务编号的用户账号。
S506,根据获取到的用户账号和对应的已分配业务编号生成业务结束通知。
在一些实施例中,服务器130根据获取到的已分配业务编号和已分配业务编号所对应的用户账号生成业务结束通知。业务结束通知中还可以包括业务结束原因。
在一些实施例中,服务器130在编号分配记录中查询获取到的用户账号所对应的多个业务编号,根据获取到的用户账号和查询到的多个业务编号生成业务结束通知。
S508,将业务结束通知发送至以获取到的用户账号登录的终端。
在一些实施例中,服务器130查询以获取的用户账号登录的终端所对应的终端地址,根据查询到的终端地址将业务结束通知发送至以获取到的用户账号登录的终端。
本实施例中,在检测到在预设时间内编号分配队列中的业务编号未被分配完毕时,结束业务编号对应的业务,避免了在预设时间内未完整业务编号对应的业务占用较多的运算资源。获取已分配业务编号对应用户账号,根据获取到的用户账号和对应的已分配业务编号生成业务结束通知,将业务结束通知发送至以获取到的用户账号登录的终端,保证在结束业务的通知及时通知已分配业务编号对应的用户。
如图6所示,在一些实施例中,S404具体包括抽取中签业务编号的步骤,该步骤具体包括以下内容:
S602,选取预设数量的已分配到业务编号的用户账号。
在一些实施例中,服务器130编号分配记录中选取预设数量的用户账号,选取的用户账号为已分配到业务编号的用户账号。其中,服务器130可以随机选取预设数量的用户账号。
在一些实施例中,服务器130在编号分配记录中记录了所选取的每个用户账号分配到业务编号的业务编号分配时间。服务器130还可以按照业务编号分配时间对用户账号进行排序,选取排在最前或最后的预设数量的用户账号。例如,按照业务编号分配时间对用户账号进行排序,选取排在最后的50个用户账号。
S604,获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号。
在一些实施例中,服务器130从编号分配记录中获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号。其中,业务编号分配时间以相同数据位数的数字串表示,例如,业务编号分配时间为2017年5月11日14点23份39秒,则以包括14个数字位的数字串20170511142339来表示。
S606,根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
在一些实施例中,服务器130将获取到的所有业务编号分配时间和已分配业务编号进行相加,将相加得到的和除以业务编号生成数量,获取将得到的和除以业务编号生成数量得到的余数,根据获取到的余数确定中签业务编号。其中,根据获取到的余数也可以确定多个中签业务编号。
本实施例中,选取预设数量的用户账号,根据用户账号对应的业务编号分配时间和已分配业务编号通过计算确定中签业务编号,保证了抽取中签业务编号的公平性;在需要确定多个中签业务编号时,避免了确定的中签业务编号出现重复的情况,提高了确定中签业务编号的准确性。
举例说明,业务人员以业务人员账号登录终端110,通过终端110输入业务信息,业务信息包括标的物信息,标的物信息包括标的物名称、标的物价格和标的物详细参数中的至少一种。其中,标的物名称为手机,标的物价格为5000元,标的物详细参数包括内存 容量、屏幕尺寸和处理器型号等参数。终端110将输入的业务信息发送至服务器130。
服务器130根据标的物价格5000元确定业务编号生成数量5000个业务编号,每个业务编号需要用户花1元钱来购买。服务器130将生成的5000个业务编号转换为无序的业务编号,将无序的业务编号添加到编号分配队列中。用户通过用户账号登录终端120,通过终端120输入购买业务编号数量。在用户通过终端120根据购买的业务编号数量支付完成后,服务器130获取业务编号分配请求,业务编号分配请求中包括用户账号和用户账号对应的购买业务编号数量,服务器130根据购买业务编号数量从编号分配队列中提取业务编号,将提取到的业务编号分配至业务编号分配请求中的用户账号。
服务器130在检测到编号分配队列中的业务编号分配完毕后,从生成的所有业务编号中抽取中签业务编号,查询分配到中签业务编号对应的用户账号,向以用户账号登录的终端发送中签通知。用户以接收到的中签通知为凭证,向业务人员兑换价格5000元的手机。
应该理解的是,虽然图3-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图3-6中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
如图7所示,在一些实施例中,提供一种业务编号分配装置700,该装置具体包括以下内容:数量获取模块702、编号生成模块704、队列添加模块706、请求获取模块708、数量提取模块710、编号提取模块712和编号分配模块714。
数量获取模块702,用于获取业务编号生成数量。
编号生成模块704,用于根据业务编号生成数量生成业务编号。
队列添加模块706,用于将生成的业务编号添加到编号分配队列中。
请求获取模块708,用于获取业务编号分配请求。
数量提取模块710,用于提取业务编号分配请求中的请求分配数量和用户账号。
编号提取模块712,用于根据请求分配数量按顺序从编号分配队列中提取业务编号。
编号分配模块714,用于将提取到的业务编号分配至用户账号。
在一些实施例中,队列添加模块还用于将生成的业务编号转换成无序的业务编号;将无序的业务编号添加到编号分配队列中。
本实施例中,根据业务编号生成数量生成业务编号,保证足够可分配的业务编号。将生成的业务编号添加到编号分配队列中,在获取业务编号分配请求后,根据业务编号分配请求中的请求分配数量从编号分配队列中提取业务编号,将提取到的业务编号分配至业务编号分配请求中的用户账号。在业务编号分配过程中,通过从编号分配队列中按顺序提取业务编号,保证提取到的业务编号不会出现重复的情况,从而降低了出现业务编号重复分 配的概率,提高了业务编号分配的准确性。
如图8所示,在一些实施例中,该业务编号分配装置700具体还包括以下内容:队列检测模块716、中签抽取模块718、账号查询模块720、通知生成模块722和通知发送模块724。
队列检测模块716,用于检测编号分配队列中业务编号是否分配完毕。
中签抽取模块718,用于若检测到编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号。
账号查询模块720,用于查询分配到中签业务编号的用户账号。
通知生成模块722,用于根据中签业务编号和查询到的用户账号生成中签通知。
通知发送模块724,用于将中签通知发送至以查询到的用户账号登录的终端。
队列检测模块716还用于检测在预设时间内编号分配队列中的业务编号是否分配完毕。
账号查询模块720还用于检测到编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号。
通知生成模块722还用于根据获取到的用户账号和对应的已分配业务编号生成业务结束通知。
通知发送模块724还用于将业务结束通知发送至以获取到的用户账号登录的终端。
本实施例中,在检测到编号分配队列中的业务编号分配完毕后,从生成的业务编号中抽取中签业务编号,根据中签业务编号和分配到中签业务编号的用户账号生成中签通知,将中签通知发送至以分配到中签业务编号的用户账号登录的终端,保证在抽取到中签业务编号后,及时通知中签用户,提高了中签通知效率。在检测到在预设时间内编号分配队列中的业务编号未被分配完毕时,结束业务编号对应的业务,避免了在预设时间内未完整业务编号对应的业务占用较多的运算资源。获取已分配业务编号对应用户账号,根据获取到的用户账号和对应的已分配业务编号生成业务结束通知,将业务结束通知发送至以获取到的用户账号登录的终端,保证在结束业务的通知及时通知已分配业务编号对应的用户。
在一些实施例中,中签抽取模块718还用于选取预设数量的已分配到业务编号的用户账号;获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
本实施例中,选取预设数量的用户账号,根据用户账号对应的业务编号分配时间和已分配业务编号通过计算确定中签业务编号,保证了抽取中签业务编号的公平性;在需要确定多个中签业务编号时,避免了确定的中签业务编号出现重复的情况,提高了确定中签业务编号的准确性。
上述业务编号分配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。其中,网络接口可以是以太网卡或无线网卡等。上述各模块可以硬件形式内嵌于或独立于终端中的处理器中,也可以以软件形式存储于终端中的存储器中,以便于处理器调用执行 以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。
一种计算机设备,计算机设备包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,处理器执行计算机指令时实现以下步骤:获取业务编号生成数量;根据业务编号生成数量生成业务编号;将生成的业务编号添加到编号分配队列中;获取业务编号分配请求;提取业务编号分配请求中的请求分配数量和用户账号;根据请求分配数量按顺序从编号分配队列中提取业务编号;将提取到的业务编号分配至用户账号。
在一些实施例中,将生成的业务编号添加到编号分配队列中,包括:将生成的业务编号转换成无序的业务编号;将无序的业务编号添加到编号分配队列中。
在一些实施例中,将提取到的业务编号分配至用户账号之后,处理器执行计算机指令时还实现以下步骤:检测编号分配队列中业务编号是否分配完毕;若检测到编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号;查询分配到中签业务编号的用户账号;根据中签业务编号和查询到的用户账号生成中签通知;将中签通知发送至以查询到的用户账号登录的终端。
在一些实施例中,将提取到的业务编号分配至用户账号之后,处理器执行计算机指令时还实现以下步骤:检测在预设时间内编号分配队列中的业务编号是否分配完毕;检测到编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号;根据获取到的用户账号和对应的已分配业务编号生成业务结束通知;将业务结束通知发送至以获取到的用户账号登录的终端。
在一些实施例中,从生成的业务编号中抽取中签业务编号,包括:选取预设数量的已分配到业务编号的用户账号;获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
本实施例中,根据业务编号生成数量生成业务编号,保证足够可分配的业务编号。将生成的业务编号添加到编号分配队列中,在获取业务编号分配请求后,根据业务编号分配请求中的请求分配数量从编号分配队列中提取业务编号,将提取到的业务编号分配至业务编号分配请求中的用户账号。在业务编号分配过程中,通过从编号分配队列中按顺序提取业务编号,保证提取到的业务编号不会出现重复的情况,从而降低了出现业务编号重复分配的概率,提高了业务编号分配的准确性。
一种非易失性计算机可读存储介质,其上存储有计算机指令,其特征在于,所述计算机指令被处理器执行时实现以下步骤:获取业务编号生成数量;根据业务编号生成数量生成业务编号;将生成的业务编号添加到编号分配队列中;获取业务编号分配请求;提取业务编号分配请求中的请求分配数量和用户账号;根据请求分配数量按顺序从编号分配队列中提取业务编号;将提取到的业务编号分配至用户账号。
在一些实施例中,将生成的业务编号添加到编号分配队列中,包括:将生成的业务编 号转换成无序的业务编号;将无序的业务编号添加到编号分配队列中。
在一些实施例中,将提取到的业务编号分配至用户账号之后,处理器还执行以下步骤:检测编号分配队列中业务编号是否分配完毕;若检测到编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号;查询分配到中签业务编号的用户账号;根据中签业务编号和查询到的用户账号生成中签通知;将中签通知发送至以查询到的用户账号登录的终端。
在一些实施例中,将提取到的业务编号分配至用户账号之后,处理器还执行以下步骤:检测在预设时间内编号分配队列中的业务编号是否分配完毕;检测到编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号;根据获取到的用户账号和对应的已分配业务编号生成业务结束通知;将业务结束通知发送至以获取到的用户账号登录的终端。
在一些实施例中,从生成的业务编号中抽取中签业务编号,包括:选取预设数量的已分配到业务编号的用户账号;获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
本实施例中,根据业务编号生成数量生成业务编号,保证足够可分配的业务编号。将生成的业务编号添加到编号分配队列中,在获取业务编号分配请求后,根据业务编号分配请求中的请求分配数量从编号分配队列中提取业务编号,将提取到的业务编号分配至业务编号分配请求中的用户账号。在业务编号分配过程中,通过从编号分配队列中按顺序提取业务编号,保证提取到的业务编号不会出现重复的情况,从而降低了出现业务编号重复分配的概率,提高了业务编号分配的准确性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机指令来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种业务编号分配方法,包括:
    获取业务编号生成数量;
    根据所述业务编号生成数量生成业务编号;
    将生成的业务编号添加到编号分配队列中;
    获取业务编号分配请求;
    提取所述业务编号分配请求中的请求分配数量和用户账号;
    根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
    将提取到的业务编号分配至所述用户账号。
  2. 根据权利要求1所述的方法,其特征在于,所述将生成的业务编号添加到编号分配队列中,包括:
    将生成的业务编号转换成无序的业务编号;及
    将所述无序的业务编号添加到编号分配队列中。
  3. 根据权利要求2所述的方法,其特征在于,所述将提取到的业务编号分配至所述用户账号之后,还包括:
    检测所述编号分配队列中业务编号是否分配完毕;
    若检测到所述编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号;
    查询分配到所述中签业务编号的用户账号;
    根据所述中签业务编号和查询到的用户账号生成中签通知;及
    将所述中签通知发送至以所述查询到的用户账号登录的终端。
  4. 根据权利要求3所述的方法,其特征在于,所述检测所述编号分配队列中业务编号是否分配完毕,包括:
    检测在预设时间内所述编号分配队列中的业务编号是否分配完毕;
    所述检测在预设时间内所述编号分配队列中的业务编号是否分配完毕之后,还包括:
    检测到所述编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号;
    根据获取到的用户账号和所述获取到的用户账号对应的已分配业务编号生成业务结束通知;及
    将所述业务结束通知发送至以所述获取到的用户账号登录的终端。
  5. 根据权利要求3所述的方法,其特征在于,所述从生成的业务编号中抽取中签业务编号,包括:
    选取预设数量的已分配到业务编号的用户账号;
    获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;及
    根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
  6. 一种业务编号分配装置,包括:
    数量获取模块,用于获取业务编号生成数量;
    编号生成模块,用于根据所述业务编号生成数量生成业务编号;
    队列添加模块,用于将生成的业务编号添加到编号分配队列中;
    请求获取模块,用于获取业务编号分配请求;
    数量提取模块,用于提取所述业务编号分配请求中的请求分配数量和用户账号;
    编号提取模块,用于根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
    编号分配模块,用于将提取到的业务编号分配至所述用户账号。
  7. 根据权利要求6所述的装置,其特征在于,所述队列添加模块还用于将生成的业务编号转换成无序的业务编号;将所述无序的业务编号添加到编号分配队列中。
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    队列检测模块,用于检测所述编号分配队列中业务编号是否分配完毕;
    中签抽取模块,用于若检测到所述编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号;
    账号查询模块,用于查询分配到所述中签业务编号的用户账号;
    通知生成模块,用于根据所述中签业务编号和查询到的用户账号生成中签通知;及
    通知发送模块,用于将所述中签通知发送至以所述查询到的用户账号登录的终端。
  9. 根据权利要求8所述的装置,其特征在于,所述队列检测模块还用于检测在预设时间内所述编号分配队列中的业务编号是否分配完毕;
    所述装置还包括:
    账号查询模块,用于检测到所述编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号;
    通知生成模块,用于根据获取到的用户账号和所述获取到的用户账号对应的已分配业务编号生成业务结束通知;及
    通知发送模块,用于将所述业务结束通知发送至以所述获取到的用户账号登录的终端。
  10. 根据权利要求8所述的装置,其特征在于,所述中签抽取模块还用于选取预设数量的已分配到业务编号的用户账号;获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
  11. 一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机指令,所述处理器执行所述计算机指令时实现以下步骤:
    获取业务编号生成数量;
    根据所述业务编号生成数量生成业务编号;
    将生成的业务编号添加到编号分配队列中;
    获取业务编号分配请求;
    提取所述业务编号分配请求中的请求分配数量和用户账号;
    根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
    将提取到的业务编号分配至所述用户账号。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述将生成的业务编号添加到编号分配队列中,包括:
    将生成的业务编号转换成无序的业务编号;及
    将所述无序的业务编号添加到编号分配队列中。
  13. 根据权利要求12所述的计算机设备,其特征在于,所述将提取到的业务编号分配至所述用户账号之后,所述处理器执行所述计算机指令时还实现以下步骤:
    检测所述编号分配队列中业务编号是否分配完毕;
    若检测到所述编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号;
    查询分配到所述中签业务编号的用户账号;
    根据所述中签业务编号和查询到的用户账号生成中签通知;及
    将所述中签通知发送至以所述查询到的用户账号登录的终端。
  14. 根据权利要求11-13任一项所述的计算机设备,其特征在于,所述检测所述编号分配队列中业务编号是否分配完毕,包括:
    检测在预设时间内所述编号分配队列中的业务编号是否分配完毕;
    所述检测在预设时间内所述编号分配队列中的业务编号是否分配完毕之后,还包括:
    检测到所述编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号;
    根据获取到的用户账号和所述获取到的用户账号对应的已分配业务编号生成业务结束通知;及
    将所述业务结束通知发送至以所述获取到的用户账号登录的终端。
  15. 根据权利要求11-13所述的计算机设备,其特征在于,所述从生成的业务编号中抽取中签业务编号,包括:
    选取预设数量的已分配到业务编号的用户账号;
    获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;及
    根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
  16. 一种非易失性计算机可读存储介质,其上存储有计算机指令,其特征在于,所述 计算机指令被处理器执行时实现以下步骤:
    获取业务编号生成数量;
    根据所述业务编号生成数量生成业务编号;
    将生成的业务编号添加到编号分配队列中;
    获取业务编号分配请求;
    提取所述业务编号分配请求中的请求分配数量和用户账号;
    根据所述请求分配数量按顺序从所述编号分配队列中提取业务编号;及
    将提取到的业务编号分配至所述用户账号。
  17. 根据权利要求16所述的存储介质,其特征在于,所述将生成的业务编号添加到编号分配队列中,包括:
    将生成的业务编号转换成无序的业务编号;及
    将所述无序的业务编号添加到编号分配队列中。
  18. 根据权利要求17所述的存储介质,其特征在于,所述将提取到的业务编号分配至所述用户账号之后,所述计算机指令被处理器执行时还实现以下步骤:
    检测所述编号分配队列中业务编号是否分配完毕;
    若检测到所述编号分配队列中的业务编号被分配完毕,从生成的业务编号中抽取中签业务编号;
    查询分配到所述中签业务编号的用户账号;
    根据所述中签业务编号和查询到的用户账号生成中签通知;及
    将所述中签通知发送至以所述查询到的用户账号登录的终端。
  19. 根据权利要求16-18任一项所述的存储介质,其特征在于,所述检测所述编号分配队列中业务编号是否分配完毕,包括:
    检测在预设时间内所述编号分配队列中的业务编号是否分配完毕;
    所述检测在预设时间内所述编号分配队列中的业务编号是否分配完毕之后,还包括:
    检测到所述编号分配队列中的业务编号未被分配完毕,获取已分配业务编号对应的用户账号;
    根据获取到的用户账号和所述获取到的用户账号对应的已分配业务编号生成业务结束通知;及
    将所述业务结束通知发送至以所述获取到的用户账号登录的终端。
  20. 根据权利要求16-18所述的存储介质,其特征在于,所述从生成的业务编号中抽取中签业务编号,包括:
    选取预设数量的已分配到业务编号的用户账号;
    获取所选取的每个用户账号对应的业务编号分配时间和已分配业务编号;及
    根据获取到的业务编号分配时间和已分配业务编号确定中签业务编号。
PCT/CN2018/080169 2017-07-24 2018-03-23 业务编号分配方法、装置、计算机设备和存储介质 Ceased WO2019019676A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SG11201913403PA SG11201913403PA (en) 2017-07-24 2018-03-23 Service number assigning method and device, computer apparatus, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710608517.2 2017-07-24
CN201710608517.2A CN107786628B (zh) 2017-07-24 2017-07-24 业务编号分配方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2019019676A1 true WO2019019676A1 (zh) 2019-01-31

Family

ID=61437799

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080169 Ceased WO2019019676A1 (zh) 2017-07-24 2018-03-23 业务编号分配方法、装置、计算机设备和存储介质

Country Status (3)

Country Link
CN (1) CN107786628B (zh)
SG (1) SG11201913403PA (zh)
WO (1) WO2019019676A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065034A (zh) * 2021-03-29 2021-07-02 上海安畅网络科技股份有限公司 一种分布式系统编号生成方法和系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786628B (zh) * 2017-07-24 2020-08-18 深圳壹账通智能科技有限公司 业务编号分配方法、装置、计算机设备和存储介质
CN108921374B (zh) * 2018-05-16 2022-07-12 中国平安人寿保险股份有限公司 保单分配方法、设备、装置及计算机可读存储介质
CN109491772B (zh) * 2018-09-28 2020-10-27 深圳财富农场互联网金融服务有限公司 业务序号生成方法、装置、计算机设备和存储介质
CN110247828B (zh) * 2019-07-30 2020-12-15 北京达佳互联信息技术有限公司 识别码分配方法及装置
CN112862574A (zh) * 2021-04-08 2021-05-28 上海哔哩哔哩科技有限公司 分布式订单号生成方法和系统
CN119066069B (zh) * 2024-08-26 2025-09-30 中电金信软件有限公司 序号生成方法、装置、计算机设备和可读存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060064921A (ko) * 2004-12-09 2006-06-14 엘지전자 주식회사 순번관리시스템
CN102063678A (zh) * 2011-01-05 2011-05-18 北京凯铭风尚网络技术有限公司 一种向网友在线派发礼品的方法和装置
CN104486407A (zh) * 2014-12-12 2015-04-01 北京国双科技有限公司 编号的生成方法及装置
CN105872830A (zh) * 2016-05-31 2016-08-17 广州华多网络科技有限公司 直播频道中的互动方法及装置
CN106506663A (zh) * 2016-11-22 2017-03-15 北京科摩仕捷科技有限公司 一种号码分配方法、服务器及系统
CN106657216A (zh) * 2016-09-19 2017-05-10 腾讯征信有限公司 序列号生成方法和装置
CN107786628A (zh) * 2017-07-24 2018-03-09 上海壹账通金融科技有限公司 业务编号分配方法、装置、计算机设备和存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060064921A (ko) * 2004-12-09 2006-06-14 엘지전자 주식회사 순번관리시스템
CN102063678A (zh) * 2011-01-05 2011-05-18 北京凯铭风尚网络技术有限公司 一种向网友在线派发礼品的方法和装置
CN104486407A (zh) * 2014-12-12 2015-04-01 北京国双科技有限公司 编号的生成方法及装置
CN105872830A (zh) * 2016-05-31 2016-08-17 广州华多网络科技有限公司 直播频道中的互动方法及装置
CN106657216A (zh) * 2016-09-19 2017-05-10 腾讯征信有限公司 序列号生成方法和装置
CN106506663A (zh) * 2016-11-22 2017-03-15 北京科摩仕捷科技有限公司 一种号码分配方法、服务器及系统
CN107786628A (zh) * 2017-07-24 2018-03-09 上海壹账通金融科技有限公司 业务编号分配方法、装置、计算机设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065034A (zh) * 2021-03-29 2021-07-02 上海安畅网络科技股份有限公司 一种分布式系统编号生成方法和系统
CN113065034B (zh) * 2021-03-29 2022-11-18 上海安畅网络科技股份有限公司 一种分布式系统编号生成方法和系统

Also Published As

Publication number Publication date
SG11201913403PA (en) 2020-01-30
CN107786628B (zh) 2020-08-18
CN107786628A (zh) 2018-03-09

Similar Documents

Publication Publication Date Title
WO2019019676A1 (zh) 业务编号分配方法、装置、计算机设备和存储介质
WO2019019644A1 (zh) 推送服务器分配方法、装置、计算机设备和存储介质
CN110677405B (zh) 一种数据处理方法、装置、电子设备及存储介质
JP6626211B2 (ja) ショートリンクを処理する方法及び装置並びにショートリンクサーバ
CN104767716B (zh) 业务请求处理方法及装置
WO2019114128A1 (zh) 区块链事务区块处理方法、电子装置及可读存储介质
JP7164719B2 (ja) 顔サンプルライブラリのデプロイ方法、顔認識による業務処理方法及び装置
CN107689968A (zh) 任务的处理系统、方法及装置
WO2012139474A1 (zh) 数据的获取方法、设备和系统
TW201629874A (zh) 業務實現方法及裝置
WO2019080232A1 (zh) 工作流系统中的任务信息传输方法、装置和计算机设备
CN106302111B (zh) 一种信息处理方法、终端及服务器
CN113691575A (zh) 通信方法、装置及系统
CN113377817A (zh) 数据处理方法、系统、设备及存储介质
CN105491078A (zh) Soa系统中的数据处理方法及装置、soa系统
CN102904823B (zh) 一种基于存储器的多用户多业务的精确流量控制方法
CN107895339A (zh) 基于共治网格的政务信息处理方法和装置
CN110457128B (zh) 任务分配方法、装置和系统
CN110111057B (zh) 一种订单分配的方法、装置、可读存储介质和电子设备
CN111767481A (zh) 访问处理方法、装置、设备和存储介质
CN110572451A (zh) 一种数据处理的方法、装置及存储介质
CN109479214B (zh) 一种负载均衡的方法及相关装置
CN116723246A (zh) 多云资源数据的处理方法、装置、设备及存储介质
CN106469166B (zh) 一种信息处理方法及装置
CN112622687B (zh) 充电柜的换电控制方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18837932

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18837932

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28/05/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18837932

Country of ref document: EP

Kind code of ref document: A1