A method for generating a smart school sports meeting order manual
Through the smart school sports meeting order manual generation method that integrates data processing, automatic scheduling algorithms and real-time update mechanisms, the problems of inefficiency, many errors and slow information updates in traditional methods are solved, and efficient and accurate order manual generation and information updates are achieved, improving the rationality of user experience and schedule.
Patent Information
- Application Number
- CN202411778094.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The production of traditional school sports meeting order manuals relies on a lot of manual labor, which leads to inefficiency, prone to errors, and slow update of information, affecting the smooth progress of the competition.
The smart school sports meeting order manual generation method is adopted, and data processing, automatic scheduling algorithms and real-time update mechanisms are integrated. The schedule is optimized through genetic algorithms, and the message queue system and API interface are configured to realize timely information transmission and update.
It significantly improves the production efficiency and accuracy of the order manual, ensures timely updates and dissemination of information, improves user experience, and improves the rationality and efficiency of the schedule.
Smart Images

Figure QLYQS_2 
Figure QLYQS_3 
Figure QLYQS_4
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a method for generating a smart school sports meeting order manual. Background Art
[0002] In the process of organizing traditional school sports meets, the production of order manuals usually relies on a lot of manual labor, which is not only time-consuming and labor-intensive, but also prone to errors. With the development of information technology, the need to simplify this process using automated tools and technical means is becoming increasingly urgent. The present invention proposes a method for generating an order manual for a smart school sports meet, which aims to greatly improve the production efficiency and accuracy of the order manual by integrating data processing, automatic scheduling algorithms and real-time update mechanisms, while ensuring the timely updating and dissemination of information.
[0003] The limitations of traditional methods are:
[0004] Manual reliance: Traditional methods rely heavily on manual input and editing, which can easily lead to data errors and omissions, especially in large-scale school sports events, which involve many events, many participants, and a huge amount of data, increasing the risk of errors.
[0005] Inefficiency: Manually making a schedule manual takes a long time, especially when there are many competition events and complex rules. Manual scheduling and adjusting the schedule is an extremely tedious task.
[0006] Information update lag: In traditional methods, score updates and schedule changes usually need to be communicated through paper documents or emails. The slow update speed of information can easily lead to information asynchrony, affecting the smooth progress of the competition.
[0007] Poor user experience: Traditional order manuals are usually distributed in paper form, which is inconvenient to carry and consult. Especially with the popularity of mobile devices today, the lack of electronic solutions has seriously affected the user experience. Summary of the invention
[0008] In view of the deficiencies in the prior art, the present invention provides a method for generating a smart school sports meeting order manual, which solves the problems existing in the prior art.
[0009] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a method for generating a smart school sports meeting order manual, comprising collecting a student list, class information, a teacher list, and basic information of venue facilities, and importing them into a system database;
[0010] Set competition items, registration conditions, competition rules, and scoring criteria, and store them in the database;
[0011] Configure a mathematical model for event scheduling, which includes variables, constraints and objective functions;
[0012] The population is initialized through a genetic algorithm, and each individual represents a possible schedule;
[0013] Calculate the fitness value of each individual and evaluate its quality; generate a new generation of population through selection, crossover and mutation operations;
[0014] Repeat the selection, crossover, and mutation operations until the preset number of iterations is reached or the stopping condition is met, and output the optimal schedule arrangement;
[0015] Configure a message queue system to receive score update requests from referees and staff to ensure timely delivery of information;
[0016] Synchronize updated information to the database through the API interface to ensure data consistency and accuracy;
[0017] The front-end application implements real-time updates through periodic polling or using WebSocket.
[0018] Furthermore, the step of configuring the user interface using Bootstrap or Flexbox is also included.
[0019] Furthermore, the student list, class information, teacher list, and basic information of venue facilities are collected and imported into the system database, including:
[0020] Standardize all collected data, unify the format, remove redundant information, and ensure data quality;
[0021] Before importing data, sensitive information is encrypted; after the data is imported, a complete backup of the database is immediately performed.
[0022] Furthermore, the competition items, registration conditions, competition rules, and scoring criteria are set and stored in the database, including:
[0023] Set up competition items: First, classify all competition items and set detailed information for each competition item, including the item name, required venue type, expected competition duration, and the upper limit of the number of participants; establish the association between competition items and other modules to ensure data consistency and integrity;
[0024] Formulate detailed rules for each competition event, including competition procedures, violations and penalties;
[0025] Provide explanations and examples of the rules;
[0026] For each scoring dimension, formulate specific scoring criteria and score ranges.
[0027] Furthermore, the mathematical model for configuring the event schedule is as follows:
[0028] Variable definition:
[0029] The competition item P is the set of all competition items, P = {p1, P2, …, p n};
[0030] Time T is the set of all possible game time periods, T = {t1, t2, .., t m};
[0031] Location L is the set of all available competition venues, L={l1,l2,..,l h};
[0032] Decision variable x pit is a binary variable representing the event p i Is it scheduled at time t and place l? If yes, then x pit = 1, otherwise x pit =0;
[0033] Constraints:
[0034] Venue availability hours:
[0035] For each venue l∈L, there is an available time period list A(l), indicating the time periods in which the venue is available;
[0036] For all l∈L and t not belonging to A(l), there is x pit = 0;
[0037] Athlete free time:
[0038] For each competitor a∈A, there is a list of free time slots F(a), indicating the time slots during which the athlete can participate in the competition;
[0039] For all a∈A and t not belonging to F(a), if there is a competition event p in which a participates i is scheduled at time t, then x pit = 0;
[0040] Rules and restrictions:
[0041] Each competition item i There are specific rules and restrictions for each competition event. i , if the rule is limited to allow a maximum of N pi Athletes participating , where Y aip is a binary variable indicating whether athlete a participated in event p i ;
[0042] Objective function:
[0043] One of the goals is to minimize the number of events occupying the same resource at the same time;
[0044] That is, minimize:
[0045] ;
[0046] A second goal is to ensure that each venue is used as much as possible within its available time;
[0047] That is, maximize: ;
[0048] The comprehensive objective function is:
[0049] , where α and β are weight coefficients used to balance the importance of time conflict and site utilization.
[0050] Further, configure the message queue system specifically:
[0051] Select a message queue service, choose RabbitMQ, Apache Kafka, or Amazon SQS;
[0052] Create a message queue specifically for receiving score update requests;
[0053] Define the message format to ensure that all data sent to the message queue are in the same format; the message format uses JSON format, and the message format contains the competition ID, athlete ID, score, and timestamp fields;
[0054] Design a consumer application to listen to messages in the message queue and process and synchronize new score update requests to the database when they are received;
[0055] Provide a client SDK for judges and staff to enable them to send score update requests to the message queue.
[0056] Further, the details of configuring the API interface include:
[0057] Use the POST method to submit a score update request;
[0058] Request parameters:
[0059] Competition ID: The ID that uniquely identifies the competition event;
[0060] Project Name: the name of the competition project;
[0061] Athlete ID: ID that uniquely identifies the athlete;
[0062] Results: Athlete's specific results;
[0063] Submission time: The timestamp of score submission.
[0064] Furthermore, format verification mechanism, range verification mechanism, uniqueness verification mechanism, transaction control mechanism, error handling mechanism, lock mechanism, and timeout handling mechanism are added to the API interface.
[0065] Further, the periodic polling step includes: setting a timer in the front-end application to trigger a data request at a fixed time interval;
[0066] When the timer is triggered, the front-end application obtains the latest game information and results from the server through HTTP requests;
[0067] After receiving the server response, the front-end application parses the data and updates the displayed content on the page; if the request fails, it records the error log and tries the request again, or prompts the user about the network connection problem.
[0068] Furthermore, the WebSocket implementation steps include:
[0069] The front-end application establishes a WebSocket connection with the server when loading;
[0070] The front-end application listens to message events on the WebSocket connection. Once a message pushed by the server is received, it will immediately process and update the page content. The front-end application can send a request to the server through the WebSocket connection to obtain the latest game information and results.
[0071] Compared with the prior art, the present invention has the following beneficial effects:
[0072] The present invention can effectively optimize the schedule by configuring a mathematical model for event scheduling, including variables, constraints and objective functions. The model takes into account constraints such as venue availability, athlete free time, and competition rules to ensure the rationality and feasibility of the schedule.
[0073] Genetic algorithm: Genetic algorithm is used to initialize the population, and through selection, crossover and mutation operations, a new generation of population is generated to gradually optimize the schedule. Finally, the optimal schedule is output, which significantly improves the efficiency and rationality of the schedule.
[0074] Message queue service: Choose a suitable message queue service (such as RabbitMQ, Apache Kafka, or Amazon SQS) and create a message queue specifically for receiving grade update requests to ensure timely delivery of information.
[0075] Message format: Define a unified message format (such as JSON format) to ensure that all data sent to the message queue are in the same format, improving the efficiency and accuracy of data processing.
[0076] Data synchronization: Update information is synchronized to the database through the API interface to ensure data consistency and accuracy. The API interface supports the POST method to submit score update requests and includes necessary verification mechanisms (such as format verification, range verification, uniqueness verification, transaction control, error handling, locking mechanism, timeout processing) to ensure data integrity and security.
[0077] Real-time update: The front-end application implements real-time update through regular polling or using WebSocket to ensure that users can get the latest game information and results in the first place. Regular polling is simple and easy to implement, suitable for small applications;
[0078] Front-end framework: Use Bootstrap or Flexbox to configure the user interface to ensure that the order manual can be displayed well on different devices, including mobile phones, tablets and computers. Bootstrap provides a wealth of responsive components and styles, which can quickly build responsive web pages; Flexbox is used to create flexible layouts, which is particularly suitable for responsive design. DETAILED DESCRIPTION
[0079] The following will be combined with the specific embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0080] The present invention provides a method for generating a smart school sports meeting order manual, comprising the following steps:
[0081] Step 1.1: Collect student lists, class information, teacher lists, and basic information about venues and facilities, and import them into the system database. Specific steps 1.1: Student list and class information collection:
[0082] Ways: Use the school's existing student management system to export the list of all students participating in the school sports meeting and their class information. In addition, you can also let students fill in their registration information through online forms, especially for students who are interested in participating in specific events.
[0083] Content: Make sure the information collected includes the student’s name, gender, age, class, contact information, and any medical conditions that may affect eligibility.
[0084] Verification: Carry out preliminary verification of the collected data and import it into the database after ensuring that it is correct.
[0085] Teachers list collection:
[0086] Approach: Export all teachers' information from the school's staff management system, especially physical education teachers and class teachers, because they may serve as organizers or referees of the competition.
[0087] Content: Record the teacher's name, position, contact information, and sports he / she is good at.
[0088] Authorization: When collecting teacher information, it should be clearly stated that the information will be used for related work of the school sports meeting, and the teacher’s consent should be obtained.
[0089] Collection of basic information on venue facilities:
[0090] Method: Field visits to all venues on campus that can be used to host sports games, including but not limited to track and field stadiums, basketball courts, and football fields.
[0091] Content: Record the detailed information of each venue’s location, area, number of people it can accommodate, and whether it is equipped with necessary facilities (such as timers, sound systems).
[0092] Maintenance Status: Evaluate and record the current maintenance status of each venue to ensure that any necessary repairs or preparations can be completed before the competition.
[0093] Data import system database
[0094] Standardization processing: Standardize all collected data, such as unifying the format, removing redundant information, and ensuring data quality.
[0095] Security measures: Before importing data, take necessary security measures to protect personal privacy, such as encrypting sensitive information.
[0096] Backup: After completing the data import, immediately make a full backup of the database to prevent data loss or corruption.
[0097] Through the above steps, the comprehensiveness and accuracy of data collection can be ensured, and a solid foundation is laid for the subsequent schedule arrangement and order manual generation.
[0098] Step 1.2: Set the competition items, registration conditions, competition rules, and scoring criteria, and store them in the database.
[0099] Specific steps 1.2: Set up the competition items:
[0100] Event classification: First, classify all competition events, such as track and field, ball games, and gymnastics, to facilitate subsequent management.
[0101] Event Details: Set detailed information for each event, including the event name, required venue type, estimated competition duration, and maximum number of participants.
[0102] Project association: Establish associations between competition projects and other modules (such as venues and personnel) to ensure data consistency and integrity.
[0103] Registration requirements:
[0104] Age Limit: Different age limits are set according to the nature of the competition to ensure the safety of the participants.
[0105] Health status: Participants are required to provide proof of health status, especially for high-intensity events.
[0106] Skill level: For some highly professional competitions, skill thresholds may be set, such as requiring a certain training background or competition experience.
[0107] Gender division: Determine whether it is necessary to divide the competition into groups based on the characteristics of the competition.
[0108] Team composition: For group projects, clearly define the number of team members and composition requirements, such as whether cross-grade teams are allowed.
[0109] Competition Rules:
[0110] Rule making: Develop detailed rules for each competition event, including competition procedures, violations and penalties.
[0111] Rule Explanation: Provide explanations and examples of the rules to help contestants better understand the rules.
[0112] Publicity of rules: Ensure that all participants and relevant personnel can easily access the competition rules, which can be viewed online or downloaded through the system platform.
[0113] Scoring criteria:
[0114] Scoring dimensions: Clarify the scoring dimensions for each competition event, such as speed, skill, and teamwork.
[0115] Scoring criteria: For each scoring dimension, formulate specific scoring criteria and score ranges.
[0116] Stored in the database:
[0117] Structural design: Rationally design the database table structure to ensure effective storage of information on competition items, registration conditions, competition rules, and scoring criteria.
[0118] Data entry: Provides a friendly data entry interface to facilitate administrators to enter relevant information.
[0119] Through the above detailed measures, the process of "setting competition events, registration conditions, competition rules, scoring standards, and storing them in the database" can be made more systematic and standardized, thus providing a solid data foundation for the subsequent schedule arrangement and order manual generation.
[0120] Step 2.1: Configure a mathematical model for event scheduling, which includes variables, constraints and objective functions.
[0121] The mathematical model for configuring event scheduling is as follows:
[0122] 1. Variable definition:
[0123] Competition item P: the set of all competition items, P = {p1, P2, ..., p n};
[0124] Time T: the set of all possible game time periods, T = {t1, t2, .., t m};
[0125] Location L: the set of all available competition venues, L={l1,l2,..,l h};
[0126] Decision variable x pit : is a binary variable, indicating the competition item p i Is it scheduled at time t and place l? If yes, then x pit = 1, otherwise x pit =0;
[0127] 2. Constraints:
[0128] Venue availability hours:
[0129] For each venue l∈L, there is an available time period list A(l), indicating the time periods in which the venue is available;
[0130] For all l∈L and t not belonging to A(l), there is x pit = 0;
[0131] Athlete free time:
[0132] For each competitor a∈A, there is a list of free time slots F(a), indicating the time slots during which the athlete can participate in the competition;
[0133] For all a∈A and t not belonging to F(a), if there is a competition event p in which a participates iis scheduled at time t, then x pit = 0;
[0134] Rules and restrictions:
[0135] Each competition item i There are some specific rules and restrictions, such as the maximum number of people and specific venue requirements;
[0136] Mathematical expression: For each event p i , if the rule is limited to allow a maximum of N pi Athletes participating , where Y aip is a binary variable indicating whether athlete a participated in event p i ;
[0137] Objective function:
[0138] Minimize time conflicts:
[0139] One of the goals is to minimize the situation where multiple events occupy the same resources (such as venues, referees) at the same time;
[0140] Mathematical formula: Minimize:
[0141] ;
[0142] Maximize site utilization:
[0143] The second goal is to ensure that each venue is used as much as possible within its available time to avoid wasting resources;
[0144] Mathematical formula: Maximization:
[0145] ;
[0146] Combining the above two objectives, we can construct a comprehensive objective function:
[0147] , where α and β are weight coefficients used to balance the importance of time conflict and site utilization;
[0148] Through the above mathematical model, we can effectively optimize the schedule of the school sports meet and ensure the rationality and efficiency of the schedule; this model not only takes into account the limitations of venue and time, but also improves the overall organizational efficiency by minimizing time conflicts and maximizing venue utilization.
[0149] Step 2.2: Initialize the population through the genetic algorithm, and each individual represents a possible schedule.
[0150] Calculate the fitness value of each individual and evaluate its quality. Generate a new generation of population through selection, crossover and mutation operations.
[0151] Repeat the selection, crossover, and mutation operations until the preset number of iterations is reached or the stopping condition is met (such as the fitness value increase is lower than the threshold), and output the optimal schedule.
[0152] Specific steps 2.2:
[0153] Initialize the population:
[0154] Population size: First, determine the population size of the genetic algorithm, that is, the number of initial solutions. The selection of population size needs to take into account the size of the search space and the limitations of computing resources. Generally speaking, a larger population size helps to improve the diversity of the search, but it also increases the computational burden. For the scheduling problem of the school sports meet, the population size can be determined based on the number of competition events and the number of venues. The recommended initial population size is 50 to 100 individuals.
[0155] Randomly generate initial solutions: Based on the defined mathematical model, randomly generate initial schedules that meet the constraints as individuals in the population. Each individual represents a possible schedule, that is, the time period and venue assigned to each event. Things to note during the random generation process:
[0156] Each competition event can only be held in one time period and one venue.
[0157] The constraints of venue availability and athlete free time must be adhered to.
[0158] Comply with the specific rules and restrictions of each competition, such as maximum number of players and specific venue requirements.
[0159] Coding strategy: In order to facilitate the operation of genetic algorithms, individuals need to be properly coded. Coding methods include binary coding, real number coding, and permutation coding. For the problem of scheduling, permutation coding can be used, that is, all competition items are arranged in a certain order, and the items in each position correspond to a time and place combination. This coding method is conducive to maintaining the practical significance of the schedule and facilitating the execution of genetic operations.
[0160] Calculate the fitness value:
[0161] For each individual, its fitness value is calculated according to the defined objective function. The fitness value reflects the quality of the individual, that is, the rationality of the schedule. The higher the fitness value, the better the schedule.
[0162] Perform selection, crossover, and mutation operations:
[0163] Selection operation: The purpose of the selection operation is to select excellent individuals from the current population and use these individuals as the basis to generate the next generation of population. You can choose between roulette selection and tournament selection. Roulette selection is based on the fitness value ratio of individuals. Individuals with higher fitness values have a greater probability of being selected. Tournament selection randomly selects several individuals for comparison, and the individual with the highest fitness value wins.
[0164] Crossover operation: Crossover operation refers to exchanging some genes of two parent individuals to generate new offspring individuals. Crossover operation helps to explore new solutions. For the schedule problem, partial matching crossover (PMX) and sequential crossover (OX) methods can be used to ensure that the schedule after the exchange still meets the constraints.
[0165] Mutation operation: Mutation operation is to change part of the genes of an individual under a certain probability to introduce new gene combinations and increase the diversity of the population. Mutation operation can be achieved by randomly exchanging the positions of two competition items or randomly adjusting the time or venue of a competition item.
[0166] Iterative Optimization:
[0167] The selection, crossover, and mutation operations are repeated to iteratively optimize the individuals in the population until the preset number of iterations is reached or the stopping condition is met (such as the fitness value increase is lower than the threshold). After each iteration, the fitness value of each individual needs to be recalculated to evaluate the quality of the newly generated schedule.
[0168] Output the optimal solution. When the stopping condition is met, select the individual with the highest fitness value from the final population, which is the optimal schedule arrangement plan and output it.
[0169] Step 3.1: Configure a message queue system to receive score update requests from referees and staff to ensure timely delivery of information.
[0170] Step 3.1 Specific details:
[0171] Configuration of the message queue system:
[0172] 1. Choose a suitable message queue service:
[0173] Service selection: According to the actual needs of the school sports meeting, choose a suitable message queue service, such as RabbitMQ, Apache Kafka or Amazon SQS.
[0174] Service deployment: You can deploy the message queue service on a local server, or choose the hosting service provided by a cloud service provider to reduce operation and maintenance costs and improve system availability.
[0175] 2. Design the message queue architecture:
[0176] Queue design: Create a message queue specifically for receiving score update requests, such as "ScoreUpdateQueue". It can be further subdivided into multiple sub-queues according to different sports or categories.
[0177] Message format: Define the message format to ensure that all data sent to the message queue is in the same format. For example, you can use JSON format, including the game ID, athlete ID, score, and timestamp fields.
[0178] Consumption mode: Design a consumer application to listen to messages in the message queue and process and synchronize new score update requests to the database when they are received.
[0179] 3. Implement the reception of score update request:
[0180] Client SDK: Provides an easy-to-use client SDK for referees and staff, allowing them to easily send score update requests to the message queue. The SDK supports multiple operating systems such as Android, iOS, and Windows.
[0181] Exception handling: Add exception handling mechanisms to the client SDK, such as retry logic when the network connection fails, to ensure that the score update request can be sent successfully.
[0182] 4. Data synchronization and consistency guarantee:
[0183] Transaction processing: When the consumer application processes the grade update request, the database transaction is used to ensure the consistency and integrity of the data. For example, when updating the grade, the relevant operation log can also be recorded.
[0184] Monitoring and alarm: Set monitoring indicators, such as message processing delay and queue length, and configure alarm notifications to respond promptly once abnormal situations are found.
[0185] Step 3.2: Synchronize the updated information to the database through the API interface to ensure data consistency and accuracy.
[0186] In order to ensure that the updated score information can be synchronized to the database efficiently and accurately, a robust API interface needs to be designed. The following are the design details of the API interface:
[0187] HTTP method: Use the POST method to submit a score update request.
[0188] URL path: for example, / api / score / update.
[0189] Request header: Contains necessary authentication information, such as the Authorization header.
[0190] Request body: JSON format, including all data required for grade update.
[0191] Request parameters:
[0192] Competition ID: An ID that uniquely identifies the competition event.
[0193] Event Name: The name of the competition event.
[0194] Athlete ID: An ID that uniquely identifies an athlete.
[0195] Results: The athlete's specific results.
[0196] Submission time: The timestamp of score submission.
[0197] Notes: An optional field used to record special circumstances or additional information.
[0198] Successful response: HTTP status code 200, returning a success message, for example { "message": "Grade updated successfully"}.
[0199] Failure response: HTTP status code 400 or 500, returning an error message, such as { "error": "Invalid grade data"} or { "error": "Database update failed"}.
[0200] To ensure data consistency and accuracy, the following mechanisms need to be added to the design and implementation of the API interface:
[0201] Format verification: Check whether the data format in the request body meets expectations, for example, whether the score is a numeric type and whether the timestamp is legal.
[0202] Range validation: Ensure that the results are within a reasonable range, for example, running results cannot be negative.
[0203] Uniqueness verification: Ensure that the results of the same athlete in the same competition are not submitted repeatedly.
[0204] Transaction control: Use database transactions to ensure the atomicity of the score update operation. Once a transaction begins, all related database operations must be completed successfully, otherwise the entire transaction is rolled back.
[0205] Error handling: If any error occurs during transaction execution, the transaction is rolled back immediately and the error message is returned.
[0206] Lock mechanism: When processing grade update requests, use row-level locks or optimistic locks to prevent concurrency conflicts. For example, when updating a grade record, first obtain the lock of the record and then perform the update operation.
[0207] Timeout processing: Set a reasonable transaction timeout to prevent database resources from being occupied for a long time.
[0208] Operation log: Record the operation log of each score update, including operation time, operator, and operation content, to facilitate subsequent auditing and problem troubleshooting.
[0209] Error log: records all failed requests and their error messages to help developers quickly locate and solve problems.
[0210] Step 3.3: The front-end application implements real-time updates through regular polling or using WebSocket to ensure that users can obtain the latest game information and results in the first place.
[0211] Periodic polling is a simple technique where the client periodically requests data from the server. The client sends a request to the server at regular intervals (e.g., every 5 seconds) to obtain the latest game information and results.
[0212] Periodic polling implementation steps:
[0213] Client sets timer: Set a timer in the front-end application to trigger a data request at a fixed time interval (such as 5 seconds).
[0214] Initiate HTTP request: When the timer is triggered, the front-end application obtains the latest game information and results from the server through HTTP request.
[0215] Process response data: After receiving the server response, the front-end application parses the data and updates the displayed content on the page.
[0216] Error handling: If a request fails, log the error and retry the request, or prompt the user about the network connection problem.
[0217] WebSocket is a two-way communication protocol that allows the server to actively push data to the client without the client frequently making requests. This approach can achieve true real-time updates.
[0218] WebSocket implementation steps:
[0219] Establishing a WebSocket connection: The front-end application establishes a WebSocket connection with the server when loading.
[0220] Listening for messages: The front-end application listens for message events on the WebSocket connection. Once a message pushed by the server is received, it immediately processes and updates the page content.
[0221] Sending requests: The front-end application can send requests to the server through the WebSocket connection, for example, to obtain the latest game information and scores.
[0222] Disconnection reconnection: Implement a disconnection reconnection mechanism to ensure that the connection can be reestablished when the network is unstable.
[0223] Error handling: Handle various exceptions in WebSocket connections, such as connection closure and error messages.
[0224] Step 4.1: Use Bootstrap or Flexbox to configure the user interface to ensure that the manual looks good on different devices, including mobile phones, tablets, and computers.
[0225] Bootstrap is a popular front-end framework that provides a wealth of responsive components and styles for quickly building responsive web pages.
[0226] Flexbox: A CSS layout mode for creating flexible layouts, especially useful for responsive design.
[0227] Specifically, use Bootstrap's grid system or Flexbox layout to divide the page into multiple areas, such as event list, latest announcement, and weather forecast.
[0228] Card component: Use the card component to display basic information about each event. The card automatically adjusts its size and arrangement on different devices.
[0229] Use the timeline view to display the full-day competition schedule. Each competition event is represented by a time block. The color and shape of the time block can be distinguished according to the type of competition.
[0230] Use table view to display detailed schedule, including game time, location, and participating team information.
[0231] Results search box: Provides a search box where users can enter competition names, athlete names and other keywords to quickly find results.
[0232] List view: The results are displayed in a list format. Each record contains the competition name, athlete name, result, and ranking information.
[0233] Chart view: Use charts (such as bar charts and line charts) to show the changing trend of competition results and enhance the visualization of data.
[0234] Through the above technical solution, the present invention effectively solves the optimization problem of the automatic scheduling algorithm when there are many events and complex rules, and significantly improves the rationality and efficiency of the schedule. At the same time, the production process of the order manual is simplified through intelligent means, the user experience is enhanced, and strong support is provided for the successful holding of the school sports meeting.
[0235] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for generating a smart school sports meeting order manual, characterized in that: The following steps are involved: Collect student lists, class information, teacher lists, basic information on venue facilities, and import them into the system database; Set competition items, registration conditions, competition rules, and scoring criteria, and store them in the database; Configure a mathematical model for event scheduling, which includes variables, constraints and objective functions; The population is initialized through a genetic algorithm, and each individual represents a possible schedule; Calculate the fitness value of each individual and evaluate its quality; generate a new generation of population through selection, crossover and mutation operations; Repeat the selection, crossover, and mutation operations until the preset number of iterations is reached or the stopping condition is met, and output the optimal schedule arrangement; Configure a message queue system to receive score update requests from referees and staff to ensure timely delivery of information; Synchronize updated information to the database through the API interface to ensure data consistency and accuracy; The front-end application implements real-time updates through periodic polling or using WebSocket; The mathematical model for configuring the event schedule is as follows: Variable definition: The competition item P is the set of all competition items, P = {p1, P2, …, p n }; Time T is the set of all possible game time periods, T = {t1, t2, .., t m }; Location L is the set of all available competition venues, L={l1,l2,..,l h }; Decision variable x pit is a binary variable representing the event p i Is it scheduled at time t and place l? If yes, then x pit = 1, otherwise x pit =0; Constraints: Venue availability hours: For each venue l∈L, there is an available time period list A(l), indicating the time periods in which the venue is available; For all l∈L and t not belonging to A(l), there is x pit =0; Athlete free time: For each competitor a∈A, there is a list of free time slots F(a), indicating the time slots during which the athlete can participate in the competition; For all a∈A and t not belonging to F(a), if there is a competition event p in which a participates i is scheduled at time t, then x pit = 0; Rules and restrictions: Each competition item i There are specific rules and restrictions for each competition event. i , if the rule is limited to allow a maximum of N pi Athletes participating , where Y aip is a binary variable indicating whether athlete a participated in event p i ; Objective function: One of the goals is to minimize the number of events occupying the same resource at the same time; That is, minimize: ; The second goal is to ensure that each venue is used as much as possible within its available time; That is, maximize: ; The comprehensive objective function is: , where α and β are weight coefficients used to balance the importance of time conflict and site utilization.
2. According to the method for generating a smart school sports meeting order manual according to claim 1, it is characterized in that: Also included are steps to configure the user interface using Bootstrap or Flexbox.
3. According to the method for generating a smart school sports meeting order manual according to claim 1, it is characterized in that: Collect student lists, class information, teacher lists, basic information of venues and facilities, and import them into the system database, including: Standardize all collected data, unify the format, remove redundant information, and ensure data quality; Before importing data, sensitive information is encrypted; after the data is imported, a complete backup of the database is immediately performed.
4. According to the method for generating a smart school sports meeting order manual according to claim 1, it is characterized in that: Set competition items, registration conditions, competition rules, and scoring criteria, and store them in the database, including: Set up competition items: First, classify all competition items and set detailed information for each competition item, including the item name, required venue type, expected competition duration, and the upper limit of the number of participants; establish the association between competition items and other modules to ensure data consistency and integrity; Formulate detailed rules for each competition event, including competition procedures, violations and penalties; Provide explanations and examples of the rules; For each scoring dimension, formulate specific scoring criteria and score ranges.
5. According to the method for generating a smart school sports meeting order manual according to claim 1, it is characterized in that: Configure the message queue system specifically: Select a message queue service, choose RabbitMQ, Apache Kafka, or Amazon SQS; Create a message queue specifically for receiving score update requests; Define the message format to ensure that all data sent to the message queue are in the same format; The message format uses JSON format, which contains the competition ID, athlete ID, score, and timestamp fields; Design a consumer application to listen to messages in the message queue and process and synchronize new score update requests to the database when they are received; Provide a client SDK for judges and staff to enable them to send score update requests to the message queue.
6. The method for generating a smart school sports meeting order manual according to claim 1, characterized in that: The details of configuring the API interface include: Use the POST method to submit a score update request; Request parameters: Competition ID: The ID that uniquely identifies the competition event; Project Name: the name of the competition project; Athlete ID: ID that uniquely identifies the athlete; Results: Athlete's specific results; Submission time: The timestamp of score submission.
7. The method for generating a smart school sports meeting order manual according to claim 1, characterized in that: Add format verification mechanism, range verification mechanism, uniqueness verification mechanism, transaction control mechanism, error handling mechanism, lock mechanism, and timeout handling mechanism to the API interface.
8. The method for generating a smart school sports meeting order manual according to claim 1, characterized in that: The periodic polling steps include: setting a timer in the front-end application to trigger a data request at a fixed time interval; When the timer is triggered, the front-end application obtains the latest game information and results from the server through HTTP requests; After receiving the server response, the front-end application parses the data and updates the displayed content on the page; if the request fails, it records the error log and tries the request again, or prompts the user about the network connection problem.
9. The method for generating a smart school sports meeting order manual according to claim 1, characterized in that: The steps to implement WebSocket include: The front-end application establishes a WebSocket connection with the server when loading; The front-end application listens to message events on the WebSocket connection. Once a message pushed by the server is received, it will immediately process and update the page content. The front-end application can send a request to the server through the WebSocket connection to obtain the latest game information and results.