CN109492017B - Service information query processing method, system, computer equipment and storage medium - Google Patents

Service information query processing method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN109492017B
CN109492017B CN201811086482.1A CN201811086482A CN109492017B CN 109492017 B CN109492017 B CN 109492017B CN 201811086482 A CN201811086482 A CN 201811086482A CN 109492017 B CN109492017 B CN 109492017B
Authority
CN
China
Prior art keywords
task
query
subtasks
master node
splitting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811086482.1A
Other languages
Chinese (zh)
Other versions
CN109492017A (en
Inventor
李季
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201811086482.1A priority Critical patent/CN109492017B/en
Publication of CN109492017A publication Critical patent/CN109492017A/en
Application granted granted Critical
Publication of CN109492017B publication Critical patent/CN109492017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application relates to a business information query processing method, a system, computer equipment and a storage medium based on cluster computing in the field of cloud technology. The method comprises the following steps: the method comprises the steps that a main node receives a query request sent by a terminal and generates a query task by utilizing the query request; the main node splits the query task into a plurality of subtasks; for any one of a plurality of subtasks, the master node polls the load weights of a plurality of slave nodes, and the slave nodes which are suitable for the subtasks are obtained through weight smoothing processing; the slave node inquires according to the subtasks and returns corresponding service information; the master node encapsulates service information returned by a plurality of slave nodes to generate a query result corresponding to the query task; and the main node returns the query result to the terminal. By adopting the method, the query efficiency of the service information can be effectively improved.

Description

Service information query processing method, system, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service information query processing method, a system, a computer device, and a storage medium.
Background
With the development of computer technology, various infrastructures have emerged. The corresponding comprehensive service system can be designed through the basic framework, the basic framework also has own limitations, and the service functions are limited. For example, through the infrastructure of PAFA (Ping An Foundation Architecture, security infrastructure), a series of business processes and general functions can be defined. However, the service information is limited by the PAFA framework, only 1 ten thousand records can be obtained at a time, and if more records are needed, different multiple queries are required to be performed for multiple times, so that the service information query efficiency is lower.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a service information query processing method, system, computer device, and storage medium that can effectively improve the query efficiency of service information.
A business information query processing method, the method comprising:
the method comprises the steps that a main node receives a query request sent by a terminal, and a query task is generated by utilizing the query request;
the main node splits the query task into a plurality of subtasks;
the master node polls the load weights of a plurality of slave nodes and obtains the slave nodes which are suitable for the subtasks through weight smoothing processing; the slave node inquires according to the subtasks and returns corresponding service information;
for any one of the plurality of subtasks, the master node encapsulates service information returned by a plurality of slave nodes to generate a query result corresponding to the query task;
and the main node returns the query result to the terminal.
In one embodiment, the query task corresponds to a plurality of preset query conditions; the splitting the query task into a plurality of subtasks by the master node includes:
the master node obtains priorities corresponding to a plurality of preset query conditions;
the master node splits the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks;
the master node records the number of subtasks and the task identification of each subtask.
In one embodiment, before the master node receives the query request sent by the terminal, the method further includes:
the master node acquires task splitting codes corresponding to a plurality of preset splitting rules;
the master node compiles the task splitting code to obtain a corresponding task splitting machine code;
the splitting the query task into a plurality of subtasks by the master node includes: and calling the task splitting machine code, and splitting the query task through the task splitting machine code to obtain a plurality of subtasks.
In one embodiment, the compiling the task splitting code by the master node to obtain the corresponding task splitting machine code includes:
the master node reads a first configuration file, and Java keywords and non-Java keywords corresponding to the task matching codes are recorded in the first configuration file;
the master node reads a second configuration file, and the function of the Java key words is recorded in the second configuration file;
the main node replaces the non-Java keywords of the task splitting codes in the first database with the corresponding Java keywords by utilizing the first configuration file;
and the master node converts the task splitting code after replacing the key words into a task splitting machine code supporting Java according to the function of the Java key words in the second configuration file, and stores the task splitting machine code supporting Java obtained after conversion into a second database.
In one embodiment, the master node polls load weights of a plurality of slave nodes, and the slave nodes adapting to the subtasks obtained through weight smoothing processing include:
the master node polls the current load weights of a plurality of slave nodes according to the slave node identifiers, and selects slave node identifiers corresponding to subtasks according to the current load weights;
the master node performs smoothing processing on the current load weight corresponding to the selected slave node identifier, and selects the slave node identifier corresponding to the next subtask by using the result after smoothing processing;
and the master node sequentially distributes the plurality of subtasks to the corresponding slave nodes according to the selected slave node identification.
A business information query processing system, the system comprising:
the main node is used for receiving a query request sent by the terminal and generating a query task by utilizing the query request; splitting the query task into a plurality of subtasks; for any one of the subtasks, polling the load weights of a plurality of slave nodes, and obtaining the slave nodes which are suitable for the subtasks through weight smoothing processing;
the slave node is used for inquiring according to the subtasks and returning corresponding service information;
the master node is also used for packaging the service information returned by the plurality of slave nodes and generating a query result corresponding to the query task; and returning the query result to the terminal.
In one embodiment, the master node is further configured to obtain priorities corresponding to a plurality of preset query conditions; splitting the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks; the number of subtasks and the task identity of each subtask are recorded.
In one embodiment, the master node is further configured to obtain task splitting codes corresponding to a plurality of preset splitting rules; compiling the task splitting code to obtain a corresponding task splitting machine code; and calling the task splitting machine code, and splitting the query task through the task splitting machine code to obtain a plurality of subtasks.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method embodiments described above when the processor executes the computer program.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the various method embodiments described above.
The service information query processing method, the system, the computer equipment and the storage medium can send a query request to the master node through the terminal when the query of the service information is required. And the master node generates a corresponding query task according to the query request and splits the query task into a plurality of subtasks. And for any one of the plurality of subtasks, the master node polls the load weights of the plurality of slave nodes, and the slave nodes which are suitable for the subtasks are obtained through weight smoothing processing. And a plurality of slave nodes are used for concurrently inquiring the subtasks distributed to the slave nodes, so that the required service information can be obtained. The master node encapsulates the service information queried by the slave node, generates a corresponding query result, and returns the query result to the terminal. Therefore, the terminal can obtain the required multiple service information only by one query without multiple queries, thereby effectively overcoming the limitation of a basic framework and improving the query efficiency of the service information.
Drawings
FIG. 1 is an application scenario diagram of a business information query processing method in one embodiment;
FIG. 2 is a flow chart of a business information query processing method in one embodiment;
FIG. 3 is a flowchart of a business information query processing method according to another embodiment;
FIG. 4 is a block diagram of a business information query processing system in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The service information query processing method provided by the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server cluster 104 via a network. The server cluster comprises a master node and a plurality of slave nodes. The communication connection is established between the master node and the terminal, and the communication connection is established between the slave node and the master node. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, among others. When the terminal 102 needs to query service information, a query request may be sent to the server cluster 104. The master node in the server cluster 104 receives the query request and generates a corresponding query task using the query request. The master node splits the query task into a plurality of subtasks. The master node polls the load weights of a plurality of slave nodes and obtains the slave nodes which are suitable for the subtasks through weight smoothing processing; and the slave node inquires according to the subtasks and returns corresponding service information. And the master node encapsulates the service information returned by the plurality of slave nodes to generate a query result corresponding to the query task. The master node returns the query result to the terminal 102. The terminal can obtain the required multiple service information by only one query without multiple queries, thereby effectively overcoming the limitation of a basic framework and improving the query efficiency of the service information.
In one embodiment, as shown in fig. 2, a service information query processing method is provided, and the method is applied to a master node in a server cluster in fig. 1 for illustration, and includes the following steps:
step 202, the master node receives a query request sent by the terminal, and generates a query task by using the query request.
In step 204, the master node splits the query task into a plurality of subtasks.
When the terminal needs to inquire service information, a corresponding inquiry condition can be selected through an inquiry page, so that an inquiry request is generated. The terminal sends a query request to the server cluster. The server cluster comprises a master node and a plurality of slave nodes. The communication connection is established between the master node and the terminal, and the communication connection is established between the slave node and the master node. The master node receives the query request and generates a corresponding query task by utilizing the query request.
In order to effectively improve the query efficiency, the main node can split the query task into a plurality of subtasks according to preset query conditions, so that the subtasks can be queried simultaneously. The master node obtains priorities corresponding to a plurality of preset query conditions; the main node splits the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks; the master node records the number of subtasks and the task identity of each subtask. The master node stores all the subtask identifications into a message queue, and distributes a plurality of subtasks to corresponding slave nodes in a first-in first-out mode.
Step 206, for any subtask of the plurality of subtasks, the master node polls the load weights of the plurality of slave nodes, and the slave nodes which are suitable for the subtasks are obtained through weight smoothing processing; and the slave node inquires according to the subtasks and returns corresponding service information.
The master node obtains current load weights corresponding to the plurality of slave node identifiers according to the node list, and traverses the current load weights corresponding to the plurality of slave node identifiers to obtain the highest load weight. And the master node distributes the first subtask in the message queue to the slave node with the highest load weight, and the current load weight of the slave node after the distributed task is subjected to smoothing processing. And the master node calculates the current load weights corresponding to the plurality of slave node identifiers according to the smoothing result to obtain the highest current load weight, and distributes the next sub-task in the message queue to the slave node with the highest current load weight to obtain the slave node identifier corresponding to the next sub-task. The resource consumption of the slave nodes which are currently allocated with the subtasks can be offset through smoothing processing, and the repeated calculation of the load weight is prevented, so that the load balance of a plurality of slave nodes in the cluster is achieved.
And step 208, the master node encapsulates the service information returned by the plurality of slave nodes to generate a query result corresponding to the query task.
And step 210, the master node returns the query result to the terminal.
Each slave node can be distributed with a plurality of subtasks, and the slave node concurrently executes inquiry on the distributed subtasks to obtain corresponding service information. The slave node can return the service information obtained by the query to the master node corresponding to the task identifier. The master node caches the task identifiers corresponding to the service information, and when the service information corresponding to all the task identifiers is received, the master node encapsulates the service information returned by the plurality of slave nodes to generate a query result corresponding to the query task. When the main node encapsulates the service information, the main node may encapsulate according to the priority of the preset query condition according to the query result corresponding to the subtask identifier. The master node may be packaged in order of priority from high to low, or may be packaged in order of priority from low to high. And the master node returns the packaged query result to the terminal.
In this embodiment, when the service information needs to be queried, a query request may be sent to the master node through the terminal. And the master node generates a corresponding query task according to the query request and splits the query task into a plurality of subtasks. For any one of the subtasks, the master node polls the load weights of the plurality of slave nodes, and the slave nodes which are suitable for the subtasks are obtained through weight smoothing processing. And a plurality of slave nodes are used for concurrently inquiring the subtasks distributed to the slave nodes, so that the required service information can be obtained. The master node encapsulates the service information queried by the slave node, generates a corresponding query result, and returns the query result to the terminal. Therefore, the terminal can obtain the required multiple service information only by one query without multiple queries, thereby effectively overcoming the limitation of a basic framework and improving the query efficiency of the service information.
In one embodiment, the query task corresponds to a plurality of preset query conditions; splitting the query task into a plurality of subtasks by the master node includes: the master node obtains priorities corresponding to a plurality of preset query conditions; the main node splits the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks; the master node records the number of subtasks and the task identity of each subtask.
Each preset query condition may be preconfigured with a corresponding priority. The master node may rank the plurality of preset query conditions according to priority. The master node splits the query task according to the level sequence of the priority. For example, the preset query conditions include query time, organization, customer level, customer home zone, etc. The order of priority from high to low is organization, customer home zone, customer level, inquiry time. The query task may correspond to one preset query condition or may correspond to a plurality of preset query conditions. The main node splits the query task according to the sequence from high priority to low priority of the preset query condition to generate a plurality of subtasks. For example, the preset query conditions are: customer list of 10 institutions within 1 month. The main node firstly splits the inquiry task into 10 subtasks according to the mechanism, then continuously splits each subtask according to the inquiry time, and finally splits the subtasks into 40 subtasks.
Each subtask has a corresponding task identifier, and the master node records the number of subtasks and the task identifier of each subtask after the task is split. The master node stores all the subtask identifications into a message queue, and distributes a plurality of subtasks to corresponding slave nodes in a first-in first-out mode. The slave node can inquire a plurality of subtasks simultaneously, so that all service information can be obtained through one inquiry without multiple inquiry, and the inquiry efficiency of the service information is effectively improved.
In one embodiment, a service information query processing method is provided, as shown in fig. 3, including the following steps:
step 302, the master node obtains task splitting codes corresponding to a plurality of preset splitting rules.
And 304, compiling the task splitting code by the master node to obtain a corresponding task splitting machine code.
And 306, the master node receives the query request sent by the terminal and generates a query task by using the query request.
In step 308, the master node invokes the task splitting machine code, and splits the query task through the task splitting machine code to obtain a plurality of subtasks.
Step 310, for any one of the subtasks, the master node polls the load weights of the plurality of slave nodes, and obtains the slave node suitable for the subtask through weight smoothing processing; and the slave node inquires according to the subtasks and returns corresponding service information.
In step 312, the master node encapsulates the service information returned by the plurality of slave nodes, and generates a query result corresponding to the query task.
And step 314, the master node returns the query result to the terminal.
In a conventional manner, when a master node splits a query task, the master node may invoke corresponding task splitting code. The master node compiles the task splitting codes to generate corresponding task splitting machine codes, and splits the query task through the task splitting machine codes.
In order to effectively improve the splitting efficiency of the query task, in this embodiment, after the master node is started, the task splitting codes corresponding to the multiple preset splitting rules are compiled to obtain corresponding task splitting machine codes. When the master node needs to split the query task, the corresponding task splitting machine code can be directly called according to a preset splitting rule. The master node can take a plurality of preset query conditions corresponding to the query task as the input of a task splitting machine code, and the task splitting machine code is operated to split the query task into a plurality of subtasks.
In this process, since the task split code is compiled into the task split machine code in advance. When the query task needs to be split, the corresponding task splitting machine code can be directly called for splitting. The time for compiling the task splitting code is saved, and the splitting efficiency of the query task is effectively improved.
Further, different query tasks may have different preset splitting rules. The master node can store task splitting codes corresponding to a plurality of preset splitting rules into a database in advance. The master node compiles various task splitting codes in the database in advance, and the compiled task splitting machine codes correspond to preset splitting rules and are stored in the database. When the master node is started, the database is accessed, and task splitting machine codes corresponding to a plurality of preset splitting rules are loaded. When the master node needs to split the query task, the corresponding task splitting machine code can be directly called according to a preset splitting rule. The main node can take the preset query conditions carried in the query task as the input of the task splitting machine code, and calculate the task splitting machine code according to the preset splitting rule, so that the splitting of the query task is completed. Because the task splitting machine code corresponding to the preset splitting rule is compiled before the master node is started, the time for compiling the task splitting code is further saved, and the splitting efficiency of the query task is further improved.
In one embodiment, compiling the task split code by the master node to obtain the corresponding task split machine code includes: the method comprises the steps that a main node reads a first configuration file, and Java keywords and non-Java keywords corresponding to task matching codes are recorded in the first configuration file; the master node reads a second configuration file, and the function of the Java key words is recorded in the second configuration file; the main node replaces the non-Java keywords of the task splitting codes in the first database with the corresponding Java keywords by using the first configuration file; and the main node converts the task splitting code after replacing the key words into a task splitting machine code supporting Java according to the function of the Java key words in the second configuration file, and stores the task splitting machine code supporting Java obtained after conversion into a second database.
Task splitting codes corresponding to a plurality of preset splitting rules can be written in advance by adopting different computer languages. For example, it may be written in a computing language such as C, C++, java, and Python. In order to facilitate the unified development work for developers, it is necessary to convert the non-Java task split code into Java task split code.
In this embodiment, a plurality of databases are deployed in a server cluster, where the databases include a first database and a second database. Wherein the first database stores non-Java task splitting codes (i.e., task splitting codes of other computer languages than Java), and the second database stores Java task splitting codes. The master node also stores a plurality of configuration files, wherein the configuration files comprise a first configuration file and a second configuration file. The plurality of configuration files may be stored in a first database or in a second database. A plurality of java keywords and corresponding non-java keywords are recorded in the first configuration file. The second configuration file records the function of each java keyword.
And the master node utilizes the first configuration file to identify corresponding non-Java keywords for various non-Java task splitting codes in the first database, and replaces the identified non-Java keywords with the corresponding Java keywords. And the master node converts the task splitting codes after replacing the keywords according to the function of each Java keyword in the second configuration file, so that the converted task splitting codes are task splitting codes supporting Java. The converted task splitting code is further compiled by the main node to generate the task splitting machine code supporting Java. Therefore, the task splitting machine code for converting the non-Java task splitting code into Java is realized, convenience is provided for developers, the task code compiling time is effectively saved, and the query task splitting efficiency is improved.
In one embodiment, the master node polls the load weights of a plurality of slave nodes, and the slave nodes adapting to the subtasks are obtained through the weight smoothing process, which comprises the following steps: the master node polls the current load weights of a plurality of slave nodes according to the slave node identifiers, and selects the slave node identifiers corresponding to the subtasks according to the current load weights; the master node performs smoothing processing on the current load weight corresponding to the selected slave node identifier, and selects the slave node identifier corresponding to the next subtask by using the result after smoothing processing; the master node sequentially distributes the plurality of subtasks to the corresponding slave nodes according to the selected slave node identification.
And the master node calculates the current load weights corresponding to the plurality of slave node identifiers according to the smoothing result to obtain the highest current load weight, and distributes the next sub-task in the message queue to the slave node with the highest current load weight to obtain the slave node identifier corresponding to the next sub-task. The resource consumption of the slave nodes which are currently allocated with the subtasks can be offset through smoothing processing, and the repeated calculation of the load weight is prevented, so that the load balance of a plurality of slave nodes in the cluster is achieved.
In one embodiment, the step of smoothing the current load weight of the slave node after the task allocation includes: the master node obtains initial load weights corresponding to a plurality of slave node identifiers according to the node list; calculating a load weight sum using the plurality of initial weights; and smoothing the current load weight of the slave node after the task is allocated by using the highest load weight of the load weight sum.
The master node may calculate a load weight sum from initial load weights of a plurality of slave nodes in the cluster. After completing the assignment of a subtask, the master node smoothes the highest load weight with the sum of the load weights. Specifically, the master node may use the highest load weight minus the sum of the load weights to perform a smoothing calculation on the current load weight of the slave node allocated with the subtasks, so as to obtain a smoothed load weight. The resource consumption of the slave nodes which are currently allocated with the subtasks can be offset through smoothing processing, and the repeated calculation of the load weight is prevented, so that the load balance of a plurality of slave nodes in the cluster is achieved.
It should be understood that, although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2 and 3 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of the other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 4, there is provided a service information query processing system, including:
a master node 402, configured to receive a query request sent by a terminal, and generate a query task using the query request; splitting the query task into a plurality of subtasks; for any of the plurality of subtasks, the load weights of the plurality of slave nodes are polled, and the slave node 404 which is adaptive to the subtask is obtained through the weight smoothing process.
The slave node 404 is configured to query according to the subtasks and return corresponding service information.
The master node 402 is further configured to encapsulate service information returned by a plurality of slave nodes, and generate a query result corresponding to the query task; and returning the query result to the terminal.
In one embodiment, the master node 402 is further configured to obtain priorities corresponding to a plurality of preset query conditions; splitting the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks; the number of subtasks and the task identity of each subtask are recorded.
In one embodiment, the master node 402 is further configured to obtain task splitting codes corresponding to a plurality of preset splitting rules; compiling the task splitting code to obtain a corresponding task splitting machine code; and calling a task splitting machine code, and splitting the query task through the task splitting machine code to obtain a plurality of subtasks.
In one embodiment, the master node 402 is further configured to read a first configuration file, where a Java keyword and a non-Java keyword corresponding to the task matching code are recorded in the first configuration file;
reading a second configuration file, wherein the function of the Java key words is recorded in the second configuration file; replacing the non-Java keywords of the task splitting codes in the first database with the corresponding Java keywords by using the first configuration file; according to the function of the Java keywords in the second configuration file, the task splitting codes after the keywords are replaced are converted into task splitting machine codes supporting Java, and the converted task splitting machine codes supporting Java are stored in the second database.
In one embodiment, the master node 402 is further configured to poll current load weights of the plurality of slave nodes according to the slave node identifiers, and select a slave node identifier corresponding to the subtask according to the current load weights;
smoothing the current load weight corresponding to the selected slave node identifier, and selecting the slave node identifier corresponding to the next subtask by using the smoothing result; and sequentially distributing the plurality of subtasks to the corresponding slave nodes according to the selected slave node identifications.
In one embodiment, a computer device is provided, which may be a server cluster. The server cluster comprises a master node and a plurality of slave nodes. Taking the master node as an example, the internal structure diagram thereof can be shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store vendor information, employee information, etc. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements any of the business information query processing methods described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the various method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A business information query processing method, the method comprising:
the method comprises the steps that a main node receives a query request sent by a terminal and generates a query task by utilizing the query request;
the master node splits the query task into a plurality of subtasks, including: invoking a task splitting machine code, splitting a query task through the task splitting machine code to obtain a plurality of subtasks, wherein the task splitting machine code is obtained by utilizing a first configuration file, identifying corresponding non-Java keywords for a plurality of non-Java task splitting codes in a first database, replacing the identified non-Java keywords with the corresponding Java keywords, converting the task splitting codes after the keywords are replaced according to the function of each Java keyword in a second configuration file, and compiling the converted task splitting codes;
for any one of the subtasks, the master node polls the load weights of a plurality of slave nodes, and obtains the slave nodes which are suitable for the subtasks through weight smoothing processing; the slave node inquires according to the subtasks and returns corresponding service information;
the master node encapsulates service information returned by a plurality of slave nodes to generate a query result corresponding to the query task;
and the main node returns the query result to the terminal.
2. The method of claim 1, wherein the query task corresponds to a plurality of preset query conditions; the splitting the query task into a plurality of subtasks by the master node includes:
the master node obtains priorities corresponding to a plurality of preset query conditions;
the master node splits the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks;
the master node records the number of subtasks and the task identification of each subtask.
3. The method of claim 1, further comprising, before the master node receives the query request sent by the terminal:
the master node acquires task splitting codes corresponding to a plurality of preset splitting rules;
the master node compiles the task splitting code to obtain a corresponding task splitting machine code;
the splitting the query task into a plurality of subtasks by the master node includes: and calling the task splitting machine code, and splitting the query task through the task splitting machine code to obtain a plurality of subtasks.
4. A method according to claim 3, wherein compiling the task split code by the master node to obtain a corresponding task split machine code comprises:
the master node reads a first configuration file, and Java keywords and non-Java keywords corresponding to the task matching codes are recorded in the first configuration file;
the master node reads a second configuration file, and the function of the Java key words is recorded in the second configuration file;
the main node replaces the non-Java keywords of the task splitting codes in the first database with the corresponding Java keywords by utilizing the first configuration file;
and the master node converts the task splitting code after replacing the key words into a task splitting machine code supporting Java according to the function of the Java key words in the second configuration file, and stores the task splitting machine code supporting Java obtained after conversion into a second database.
5. The method of claim 1, wherein the master node polling the load weights of the plurality of slave nodes, and obtaining slave nodes suitable for the subtasks through weight smoothing processing comprises:
the master node polls the current load weights of a plurality of slave nodes according to the slave node identifiers, and selects slave node identifiers corresponding to subtasks according to the current load weights;
the master node performs smoothing processing on the current load weight corresponding to the selected slave node identifier, and selects the slave node identifier corresponding to the next subtask by using the result after smoothing processing;
and the master node sequentially distributes the plurality of subtasks to the corresponding slave nodes according to the selected slave node identification.
6. A business information query processing system, the system comprising:
the main node is used for receiving a query request sent by the terminal and generating a query task by utilizing the query request; splitting the query task into a plurality of subtasks; for any one of the subtasks, polling the load weights of a plurality of slave nodes, and obtaining the slave node which is suitable for the subtask through weight smoothing processing, wherein the method comprises the following steps: invoking a task splitting machine code, splitting a query task through the task splitting machine code to obtain a plurality of subtasks, wherein the task splitting machine code is obtained by utilizing a first configuration file, identifying corresponding non-Java keywords for a plurality of non-Java task splitting codes in a first database, replacing the identified non-Java keywords with the corresponding Java keywords, converting the task splitting codes after the keywords are replaced according to the function of each Java keyword in a second configuration file, and compiling the converted task splitting codes;
the slave node is used for inquiring according to the subtasks and returning corresponding service information;
the master node is also used for packaging the service information returned by the plurality of slave nodes and generating a query result corresponding to the query task; and returning the query result to the terminal.
7. The system of claim 6, wherein the master node is further configured to obtain priorities corresponding to a plurality of preset query conditions; splitting the query task according to the level sequence of the priority and preset query conditions to generate a plurality of subtasks; the number of subtasks and the task identity of each subtask are recorded.
8. The system of claim 6, wherein the master node is further configured to obtain task splitting codes corresponding to a plurality of preset splitting rules; compiling the task splitting code to obtain a corresponding task splitting machine code; and calling the task splitting machine code, and splitting the query task through the task splitting machine code to obtain a plurality of subtasks.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN201811086482.1A 2018-09-18 2018-09-18 Service information query processing method, system, computer equipment and storage medium Active CN109492017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811086482.1A CN109492017B (en) 2018-09-18 2018-09-18 Service information query processing method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811086482.1A CN109492017B (en) 2018-09-18 2018-09-18 Service information query processing method, system, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109492017A CN109492017A (en) 2019-03-19
CN109492017B true CN109492017B (en) 2024-01-12

Family

ID=65690675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811086482.1A Active CN109492017B (en) 2018-09-18 2018-09-18 Service information query processing method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109492017B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765157B (en) * 2019-09-06 2024-02-02 中国平安财产保险股份有限公司 Data query method, device, computer equipment and storage medium
CN111444445A (en) * 2020-03-25 2020-07-24 平安医疗健康管理股份有限公司 Data transmission method, system, computer equipment and readable storage medium
CN111784318A (en) * 2020-06-29 2020-10-16 京东数字科技控股有限公司 Data processing method and device, electronic equipment and storage medium
CN111858585A (en) * 2020-06-30 2020-10-30 深圳幂度信息科技有限公司 Block chain strategy processing device, computer readable storage medium and terminal equipment
CN111930770A (en) * 2020-07-15 2020-11-13 北京金山云网络技术有限公司 Data query method and device and electronic equipment
CN111858656A (en) * 2020-07-21 2020-10-30 威讯柏睿数据科技(北京)有限公司 Static data query method and device based on distributed architecture
CN111858657B (en) * 2020-07-21 2022-02-22 威讯柏睿数据科技(北京)有限公司 Method and equipment for accelerating data parallel query based on high-frequency data processing
CN112347256A (en) * 2020-11-06 2021-02-09 中国平安人寿保险股份有限公司 Method, device, equipment and storage medium for running task
CN113342532B (en) * 2021-06-25 2023-03-21 深圳前海微众银行股份有限公司 Zookeeper-based distributed task scheduling method and system
CN113806575B (en) * 2021-08-05 2024-02-20 贝壳找房(北京)科技有限公司 Picture information acquisition method and device in warehouse splitting
CN115297122B (en) * 2022-09-29 2023-01-20 数字江西科技有限公司 Government affair operation and maintenance method and system based on load automatic monitoring
CN117808602A (en) * 2024-03-01 2024-04-02 联动优势电子商务有限公司 Hot account billing method and related device based on sub-account expansion

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464884A (en) * 2008-12-31 2009-06-24 阿里巴巴集团控股有限公司 Distributed task system and data processing method using the same
CN102467415A (en) * 2010-11-03 2012-05-23 大唐移动通信设备有限公司 Service facade task processing method and equipment
CN102479225A (en) * 2010-11-26 2012-05-30 中国移动通信集团四川有限公司 Distributed data analyzing and processing method and system
CN106407190A (en) * 2015-07-27 2017-02-15 阿里巴巴集团控股有限公司 Event record querying method and device
CN108156236A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Service request processing method, device, computer equipment and storage medium
CN108156235A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Online verification method, apparatus, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464884A (en) * 2008-12-31 2009-06-24 阿里巴巴集团控股有限公司 Distributed task system and data processing method using the same
CN102467415A (en) * 2010-11-03 2012-05-23 大唐移动通信设备有限公司 Service facade task processing method and equipment
CN102479225A (en) * 2010-11-26 2012-05-30 中国移动通信集团四川有限公司 Distributed data analyzing and processing method and system
CN106407190A (en) * 2015-07-27 2017-02-15 阿里巴巴集团控股有限公司 Event record querying method and device
CN108156236A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Service request processing method, device, computer equipment and storage medium
CN108156235A (en) * 2017-12-22 2018-06-12 平安养老保险股份有限公司 Online verification method, apparatus, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109492017A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109492017B (en) Service information query processing method, system, computer equipment and storage medium
CN110309334B (en) Query method, system, computer device and readable storage medium for graph database
US10831562B2 (en) Method and system for operating a data center by reducing an amount of data to be processed
CN108510082B (en) Method and device for processing machine learning model
CN110612705B (en) Method for service deployment under server-free architecture and function management platform
CN110764700B (en) Data storage method and device, computer equipment and storage medium
EP3975474B1 (en) Methods and apparatuses for chaining service data
CN108959385B (en) Database deployment method, device, computer equipment and storage medium
CN110708247B (en) Message routing method, message routing device, computer equipment and storage medium
CN110704177B (en) Computing task processing method and device, computer equipment and storage medium
CN111708586B (en) Application starting configuration item loading method and device, computer equipment and storage medium
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN112612595A (en) Method and device for establishing micro-service calling relationship, computer equipment and storage medium
CN112860450B (en) Request processing method and device
CN110457401B (en) Data storage method and device, computer equipment and storage medium
US9854047B2 (en) Service pool for multi-tenant applications
CN114036031A (en) Scheduling system and method for resource service application in enterprise digital middleboxes
CN107276998B (en) OpenSSL-based performance optimization method and device
CN110941681B (en) Multi-tenant data processing system, method and device of power system
CN109254997B (en) Data synchronization method, system, computer device and readable storage medium
CN115858013B (en) Multi-research and development project parallel resource allocation method, system, device and medium
CN110519097B (en) Elastic expansion service triggering method, device, equipment and readable storage medium
CN113656434B (en) Data query method and device, computer equipment and storage medium
CN116521353A (en) Resource management method, device and management server
CN117743434A (en) Batch data warehousing method and device, computer equipment and storage medium

Legal Events

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